Skip to contents

Return a possibly modified copy of an R object with its class set to a filter spectrum. In the case of conversion from a solute_spct object, compute the spectral quantity based on additional input from user.

Usage

as.filter_spct(x, ...)

# Default S3 method
as.filter_spct(x, Tfr.type = c("total", "internal"), ...)

# S3 method for class 'solute_spct'
as.filter_spct(
  x,
  Tfr.type = "internal",
  Rfr.constant = NA_real_,
  comment = NULL,
  molar.concentration = NULL,
  mass.concentration = NULL,
  path.length = 1,
  ...
)

Arguments

x

an R object.

...

Arguments passed on to setFilterSpct

multiple.wl

numeric Maximum number of repeated w.length entries with same value.

idfactor

character Name of factor distinguishing multiple spectra when stored longitudinally (required if mulitple.wl > 1).

thickness

numeric The thickness of the material.

attenuation.mode

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

strict.range

logical Flag indicating whether off-range values result in an error instead of a warning.

Tfr.type

character Either "total" or "internal".

Rfr.constant

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

comment

character A string to be added as a comment attribute to the object created. If not supplied, the comment will be copied from x.

molar.concentration, mass.concentration

numeric Concentration to be used to compute transmittance of the solute in solution [\(mol\,m^{-3} = mmol\,dm^{-3}\) or \(kg\,m^{-3} = g\,dm^{-3}\), respectively].

path.length

numeric The length of the light path (\(m\)) used to compute transmittance of the solute in a solution.

Value

A copy of x converted into a filter_spct. object.