Learn R Programming

photobiology (version 0.11.4)

setFilterProperties: Set the "filter.properties" attribute

Description

Function to set by reference the "filter.properties" attribute of an existing filter_spct object.

Usage

setFilterProperties(
  x,
  filter.properties = NULL,
  pass.null = FALSE,
  Rfr.constant = NA_real_,
  thickness = NA_real_,
  attenuation.mode = NA_character_
)

filter_properties(x) <- value

Value

x

Arguments

x

a filter_spct object

filter.properties, value

a list with fields named "Rfr.constant", "thickness" and "attenuation.mode".

pass.null

logical If TRUE, the parameters to the next three parameters will be always ignored, otherwise they will be used to build an object of class "filter.properties" when the argument passed to parameter filter.properties is NULL.

Rfr.constant

numeric The value of the reflection factor [/1].

thickness

numeric The thickness of the material [\(m\)].

attenuation.mode

character One of "reflection", "absorption", "absorption.layer", "mixed" or "stack".

Details

Storing filter properties allows inter-conversion between internal and total transmittance, as well as computation of transmittance for arbitrary thickness of the material. Whether computations are valid depend on the homogeneity of the material. The parameter pass.null makes it possible to remove the attribute.

See Also

Other measurement metadata functions: add_attr2tb(), getFilterProperties(), getHowMeasured(), getInstrDesc(), getInstrSettings(), getSoluteProperties(), getWhatMeasured(), getWhenMeasured(), getWhereMeasured(), get_attributes(), isValidInstrDesc(), isValidInstrSettings(), select_spct_attributes(), setHowMeasured(), setInstrDesc(), setInstrSettings(), setSoluteProperties(), setWhatMeasured(), setWhenMeasured(), setWhereMeasured(), spct_attr2tb(), spct_metadata(), subset_attributes(), trimInstrDesc(), trimInstrSettings()

Examples

Run this code

my.spct <- polyester.spct
filter_properties(my.spct)
filter_properties(my.spct) <- NULL
filter_properties(my.spct)
filter_properties(my.spct, return.null = TRUE)
filter_properties(my.spct) <- list(Rfr.constant = 0.01,
                                   thickness = 125e-6,
                                   attenuation.mode = "absorption")
filter_properties(my.spct)

Run the code above in your browser using DataLab