Learn R Programming

photobiologyInOut (version 0.4.29)

spct_CCT: Correlated color temperature

Description

Wrapper on function computeCCT from package 'colorSpec' that accepts source_spct objects.

Usage

spct_CCT(
  spct,
  isotherms = "robertson",
  locus = "robertson",
  strict = FALSE,
  named = FALSE
)

Value

A numeric value for "color temperature " in degrees Kelvin.

Arguments

spct

source_spct A single light source spectrum.

isotherms

character A vector whose elements match one of the available isotherm families: 'robertson', 'mccamy', and 'native'. Matching is partial and case-insensitive. When more than one family is given, a matrix is returned, see Value. When isotherms = 'native' the isotherms are defined implicitly as lines perpendicular to the locus, see Details in CCTfromXYZ. The character NA (NA_character_) is taken as a synonym for 'native'.

locus

character Valid values are 'robertson' and 'precision', see above. Matching is partial and case-insensitive.

strict

logical The CIE considers the CCT of a chromaticity uv to be meaningful only if the distance from uv to the Planckian locus is less than or equal to 0.05 (in CIE UCS 1960). If strict=FALSE, then this condition is ignored. Otherwise, the distance is computed along the corresponding isotherm, and if it exceeds 0.05 the returned CCT is set to NA.

named

logical Whether to set the name attribute of the returned value to the name of the spectrum passed as argument if possible.

Details

Please see computeCCT for the details of the computations and references.

Examples

Run this code

spct_CCT(white_led.source_spct)
spct_CCT(sun.spct)

Run the code above in your browser using DataLab