Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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

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 to filter.properties is NULL.

Rfr.constant

numeric The value of the reflection factor (/1).

thickness

numeric The thickness of the material.

attenuation.mode

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

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.

Value

x

Note

This function alters x itself by reference and in addition returns x invisibly. If x is not a filter_spct object, x is not modified.

The values of 'attenuation.mode' "reflection" and "absorption" should be used when one of these processes is clearly the main one; "mixed" is for cases when they both play a role, i.e., when a simple correction using a single value of Rfr across wavelengths is not possible; "absorption.layer" is for cases when a thin absorbing layer is deposited on the surface of a transparent support or enclosed between two sheets of glass or other transparent material. If in doubt, set this to NA to ensure that computation of spectra for other thicknesses remains disabled.

See Also

Examples

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)

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.