MATLAB toolkit for melanopsin photoreception research -- spectral databases, photoreceptor templates, and light source analysis.
%%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '#E8F4FD', 'primaryBorderColor': '#7BA7C9', 'primaryTextColor': '#2C3E50', 'secondaryColor': '#FDF2E9', 'secondaryBorderColor': '#D4A574', 'secondaryTextColor': '#2C3E50', 'tertiaryColor': '#EAFAF1', 'tertiaryBorderColor': '#82C9A1', 'tertiaryTextColor': '#2C3E50', 'lineColor': '#5D6D7E', 'textColor': '#2C3E50', 'background': '#FFFFFF', 'mainBkg': '#E8F4FD', 'nodeBorder': '#7BA7C9', 'clusterBkg': '#F8F9FA', 'clusterBorder': '#BDC3C7', 'fontSize': '14px'}}}%%
graph LR
A[Database<br/>SPDs, Templates]:::input --> B[Lib<br/>Core Functions]
B --> C[Demos & Apps]
C --> D[Figure Output]:::output
classDef input fill:#FDF2E9,stroke:#D4A574
classDef output fill:#EAFAF1,stroke:#82C9A1
lightLab is a MATLAB library for computational photoreception research, with particular focus on melanopsin-driven non-visual responses. It bundles curated spectral databases (light source SPDs, photoreceptor sensitivity templates, ocular media transmittance) with analysis functions for computing effective irradiance, photoreceptor excitation, and spectral weighting.
The toolkit supports research on circadian photoentrainment, pupillary light reflex, and other non-image-forming responses mediated by intrinsically photosensitive retinal ganglion cells (ipRGCs).
- Spectral database -- curated collection of light source spectral power distributions and photoreceptor sensitivity templates
- Photoreceptor models -- CIE-standard and literature-derived templates for all five human photoreceptor types (S, M, L cones, rods, melanopsin)
- Ocular media filtering -- age-dependent lens and media transmittance models
- Effective irradiance -- computation of melanopic, rhodopic, and cone-weighted irradiance metrics
- Visualization -- publication-ready spectral plots and comparison figures
- Demo applications -- ready-to-run examples demonstrating common analysis workflows
git clone https://github.com/petteriTeikari/lightLabIn MATLAB, add the repository to your path and explore the demos:
addpath(genpath('lightLab'));
% Run any script in demosAndApps/lightLab/
├── database/ # Spectral power distributions, photoreceptor templates, reference data
├── lib/ # Core library functions (spectral math, filtering, conversions)
├── demosAndApps/ # Runnable demo scripts and small applications
└── figuresOut/ # Auto-saved output figures from demos
If you use this software in your research, please cite:
@software{teikari2013lightlab,
author = {Teikari, Petteri},
title = {{lightLab}: {MATLAB} Toolkit for Melanopsin Photoreception Research},
year = {2013},
url = {https://github.com/petteriTeikari/lightLab}
}MIT License. See LICENSE for details.