computeCCT: Compute Correlated Color Temperature (CCT) of Light Spectra
Description
Compute the CCT in Kelvin degrees of a colorSpec object with type equal to 'light'
Usage
## S3 method for class 'colorSpec':
computeCCT( x )
CCTfromXYZ( XYZ )
Arguments
x
an colorSpec Robject with type equal to 'light', and M spectra
XYZ
a colorSpec 3-vector with XYZ tristimuls values
Value
computeCCT returns a numeric vector of length M, where M is the number of spectra in x.
The vector's names is set to specnames(x).
If the type of x is not 'light', then a warning is issued and all values are NA.
CCTfromXYZ returns a single number, but if the chromaticity of XYZ is too far from the daylight locus, then it returns NA.
In computeCCT, for each spectrum, XYZ is computed using xyz1931.1nm,
and the result passed to CCTfromXYZ.
If the quantity of x is 'photons' (actinometric) each spectrum is
converted to 'power' (radiometric) on the fly.
In CCTfromXYZ, the CCT is computed using Robertson's Method,
which can compute CCTs in the interval [1666.7K,Inf], see References.
References
Günther Wyszecki and W. S. Stiles.
Color Science: Concepts and Methods, Quantitative Data and Formulae, Second Edition.
John Wiley & Sons, 1982.
Table 1(3.11). pp. 227-228.