Distribute integrated lux across a reference spectral shape.
Source:R/converters.R
lux2irradiance.Rdlux is a single scalar; a spectrum has many degrees of freedom. This
function takes a reference shape and rescales it so its photopic
integral equals lx. The shape assumption must be supplied by the
caller.
Usage
lux2irradiance(
lx,
spectrum,
lambda = NULL,
LEF = CIE1931,
binwidth = NULL,
integration = c("rectangle", "trapezoid")
)Arguments
- lx
Target illuminance in lux.
- spectrum
Reference spectral shape. Either a data frame with columns
lambdaandirradiance, or a bare numeric vector (in which caselambdamust be supplied separately).- lambda
Wavelength grid in nm. Required when
spectrumis a bare vector; ignored whenspectrumis a data frame.- LEF
Luminous efficiency function. Defaults to
CIE1931.- binwidth
Wavelength bin width in nm. Inferred from a regular multi-bin wavelength grid when
NULL; required for a single bin under rectangular integration. Must beNULLfor trapezoidal integration.- integration
Integration method passed to
irradiance2lux:"rectangle"(default) or"trapezoid".
Examples
spec <- data.frame(lambda = CIE1931$lambda, irradiance = CIE1931$W)
irr <- lux2irradiance(5000, spec)