convertTfrType: Convert the "Tfr.type" attribute

View source: R/spct.classes.r

convertTfrTypeR Documentation

Convert the "Tfr.type" attribute

Description

Function to set the "Tfr.type" attribute and simultaneously converting the spectral data to correspond to the new type.

Usage

convertTfrType(x, Tfr.type = NULL)

Arguments

x

a filter_spct, object_spct, filter_mspct or object_mspct object.

Tfr.type

character One of "internal" or "total".

Details

Internal transmittance uses as reference the light entering the object while total transmittance takes the incident light as reference. The conversion is possible only if reflectance is known. Either as spectral data in an object_spct object, a filter_spct object that is "under-the-hood" an object_spct, or if a fixed reflectance factor applicable to all wavelengths is stored in the filter.properties attribute of the filter_spct object.

Value

x possibly with the "thickness" field of the "filter.properties" attribute modified

Note

if x is not a filter_spct object, x is returned unchanged. If x does not have the "filter.properties" attribute set if it is missing data, x is returned with Tfr set to NA values.

See Also

Other time attribute functions: checkTimeUnit(), convertThickness(), convertTimeUnit(), getTimeUnit(), setTimeUnit()

Examples


my.spct <- polyester.spct
filter_properties(my.spct) <- list(Rfr.constant = 0.07,
                                   thickness = 125e-6,
                                   attenuation.mode = "absorption")
convertTfrType(my.spct, Tfr.type = "internal")


photobiology documentation built on Oct. 21, 2023, 1:06 a.m.