The ciespec2unit function weights given spectra with the provided reference weighting functions and returns the integrated values, see equation 1. The function uses a linear interpolation if the wavelength steps are smaller than in the weighting function reference, \Delta\lambda is derived from the input wavelength vector. The weighting functions are derived from the ciespec function. Any errors in the data set or in results generated with the Lighting Toolbox are not in the liability of the CIE nor me, see licence.
(1) \qquad X = K_{\text{m}} \cdot \sum{\left( X_{\text{e,}\lambda} \cdot S_{\lambda}\cdot\Delta\lambda\right)}
Where:
Parameter | Description |
X | Is the spectrally weighted and integrated value. |
K_{\text{m}} | Is the luminous efficacy. |
X_{\text{e,}\lambda} | Is the spectral power distribution of the input unit. |
S_{\lambda} | Is the spectral weighting function. |
\Delta\lambda | Is the wavelength step width. |
Usage:
value = ciespec2unit(lam,spec,'reference',k)
Where:
Parameter | Description |
value | Is/are the spectrally weighted and integrated return value(s). |
lam | Is a vector speciefying the wavelength steps. |
spec | Is a vector or matrix contains the spectral power distribution(s) (SPD), row-wise. |
'reference' | Defines the weighting function, as in the following table, or as vector. Note: one can actually use all references given in the ciespec function. |
k | Is the luminous efficacy K_{\text{m}}, for photopic values K_{\text{m}} equals 683.002~\frac{\text{lm}}{\text{W}} for scotopic values K_{\text{m}} equal 1700.13~\frac{\text{lm}}{\text{W}}. Note that scotopic ‘V-L’ and rhodopic ‘rh’ are treated differently because ‘rh’ is evaluated as in CIE S 026. |
Weighting references
Reference | Description |
'x' | 2° tristimulus function \bar{x} |
'y' | 2° tristimulus function \bar{y}, equals ’VL’ |
'z' | 2° tristimulus function \bar{z} |
'xyz' | 2° tristimulus functions \bar{x}, \bar{y} and \bar{z} |
'x10' | 10° tristimulus function \bar{x}_{10} |
'y10' | 10° tristimulus function \bar{y}_{10} |
'z10' | 10° tristimulus function \bar{z}_{10} |
'xyz10' | 10° tristimulus function \bar{x}_{10}, \bar{y}_{10} and \bar{z}_{10} |
'r' | CIE \bar{r} function, note: source only 380 nm – 780 nm in 5 nm steps |
'g' | CIE \bar{g} function, note: source only 380 nm – 780 nm in 5 nm steps |
'b' | CIE \bar{b} function, note: source only 380 nm – 780 nm in 5 nm steps |
'rgb' | CIE \bar{r}, \bar{g} and \bar{b} function, note: source only 380 nm – 780 nm in 5 nm steps |
'VL' | V(\lambda), equals tristimulus function ’y’ |
'V-L' | V'(\lambda), NOTE: equals rhodopic ’rh’ but the calculation is executed with K_{\text{m}}= 1700.13~\frac{\text{lm}}{\text{W}}. |
'sc' | retinal ganglion cells: s-cone-opic s_{\text{sc}} or cyanopic |
'mc' | retinal ganglion cells: m-cone-opic s_{\text{mc}} or chloropic |
'lc' | retinal ganglion cells: l-cone-opic s_{\text{lc}} or erythropic |
'rh' | retinal ganglion cells: rhodopic s_{\text{rh}}, or scotopic, NOTE: equals scotopic ‘V-L’ but the calculation is executed with K_{\text{m}}=1~\frac{\text{lm}}{\text{W}} according to CIE S 026. |
'mel' | retinal ganglion cells: melanopic s_{\text{mel}} |
'a-opic' | all retinal ganglion cells: s_{\text{sc}}, s_{\text{mc}}, s_{\text{lc}}, s_{\text{rh}} and s_{\text{mel}} |
'BLH' | Blue Light Hazard weighting function, see also: cieblh |
Examples
Derive Tristimulus values X, Y and Z from the spectral power distribution of standard illuminant ‘D65’:
lam = 360:830; spec = ciespec(lam,'D65'); XYZ = ciespec2unit(lam,spec,'xyz')
See also: ciespec, ciespec2xyz
Result:
XYZ = 6.8599e+06 7.2173e+06 7.8584e+06
Derive α-opic values from the spectral power distribution of standard illuminants ‘D65’ and ‘D75’:
lam = 360:830; spec = ciespec(lam,{'D65','D75'}); aopic = ciespec2unit(lam,spec,'a-opic')
See also: ciespec
Result:
aopic = 5.8986e+03 1.0507e+04 1.1756e+04 1.0463e+04 9.5717e+03 6.7283e+03 1.0830e+04 1.1855e+04 1.1180e+04 1.0376e+04
References: