functions in cie.i -
cie_a
|
cie_a(lambda) Return CIE A illuminant (incandescent lighting) as a function of wavelength LAMBDA in nm. (2856 K Plankian) | |
SEE ALSO: | cie_d |
cie_d
|
cie_d(lambda) or cie_d(lambda, T) or cie_d(lambda, xD, yD) or cie_d(lambda, xyD) Return CIE D illuminant (daylight) as a function of wavelength LAMBDA in nm. In the first form, return the D65 illuminant (noon daylight). In the second form, T is the temperature in K (roughly 6500 for D65). In the third and fourth forms, (xD,yD) or xyD=[xD,yD] are chromaticity coordinates (roughly [0.31271,0.32902] for D65). This function implements the formulas given in http://en.wikipedia.org/wiki/Standard_illuminant combined with the exact CIE tabulated S0,S1,S2 daylight components. The CIE tabulated D65 illuminant (from http://files.cie.co.at/204.xls the same source as the daylight components) differs slightly. In its single argument form, cie_d returns the best fit to the D65 table from CIE, which corresponds to T=6502.849 K. The maximum disagreement with the table is less than 0.00081, while the table itself shows the 0.0001 digit. | |
SEE ALSO: | cie_a |
cie_rgb
|
xyz = cie_xyz(lambda) Return the 1931 CIE RGB color matching functions at wavelength LAMBDA (nm). LAMBDA may be an array; the return value has an additional trailing dimension of length 3, corresponding to the [R, G, B] color matching functions. The [R,G,B] values are the (scaled) brightnesses of monochromatic primaries of wavelengths 700 nm (R), 546.1 nm (G), and 435.8 nm (B) (convenient to produce in 1931, otherwise arbitrary), required to exactly match a fourth monochromatic color of wavelength LAMBDA. The R, G, B components can be negative (especially the R component), meaning that the primary must be added to the LAMBDA wavelength instead of to the other primaries to achieve a match. | |
SEE ALSO: | cie_rgb, cie_a, cie_d |
cie_xyz
|
xyz = cie_xyz(lambda) Return the 1931 CIE standard observer color matching functions at wavelength LAMBDA (nm). LAMBDA may be an array; the return value has an additional trailing dimension of length 3, corresponding to the [X, Y, Z] color matching functions. If you have a spectrum as a 1D array with the same length as LAMBDA, and if the spectrum is negligible outside the range of LAMBDA, then the [X,Y,Z] color space coordinates for that spectrum are the integral: ((spectrum * cie_xyz(lambda))(zcen) * lambda(dif))(sum,) With the xy=1 keyword, returns only the CIE [x,y] chromaticity coordinates instead of the full [X,Y,Z] color space coordinates. With LAMBDA=span(380,780,n), this gives you n points around the curved monochromatic locus of the CIE 1931 chromaticity diagram. | |
SEE ALSO: | cie_rgb, cie_a, cie_d |