setBSWFUsed: The "bswf.used" attribute

View source: R/spct.classes.r

setBSWFUsedR Documentation

The "bswf.used" attribute

Description

Function to set by reference the "time.unit" attribute of an existing source_spct object, and function to query its value.

Usage

setBSWFUsed(x, bswf.used = c("none", "unknown"))

getBSWFUsed(x)

Arguments

x

a source_spct object.

bswf.used

a character string, either "none" or the name of a BSWF.

Details

Effective spectral irradiance, describes an estimate of the strength of the radiation towards eliciting a given response, frequently, but not only a biological response. The biological spectral weighting function, BSWF, used, can be for example that of the human eye, or an action spectrum, such as the erythema, or reddening of the human skin, action spectrum.

I_{BE}(\lambda) = I(\lambda) \times f_{BE}(\lambda)

where, I_{BE}(\lambda) is the biologically effective spectral irradiance, I(\lambda) is the spectral irradiance and f_{BE}(\lambda) is one of many possible BSWF.

When the values stored in a source_spct object have been multiplied by those from a curve describing a certain response or effect, the attribute "time.unit" is set accordingly to track the transformation applied to the data. When a spectral response data have been directly measured, they should be stored in an object of class response_spct as they are expressed in actual response units, not of class source_spct expressed in irradiance units, even if weighted. However, when like in the case of spectral illuminance, the aim is technical measure of a light source, class source_spct should be used and the BSWF set in the metadata.

This attribute is normally set by the function or operator used to apply the BSWF to spectral irradiance data, or set when the source_spct object is created.

Value

x or the character value stored in x.

Note

Function setBSWFUsed() alters x itself by reference and in addition returns x invisibly. If x is not a source_spct, x is not modified. The behaviour of this function is 'unusual' in that the default for parameter bswf.used is used only if x does not already have this attribute set. Function getBSWFUsed() returns the value to which the attribute is set as a character string and otherwise NA.

Examples

getBSWFUsed(sun.spct)


aphalo/photobiology documentation built on April 1, 2024, 6:48 p.m.