Convert raw counts data into a spectral fraction
Source:R/s-fraction-corrected.R
s_fraction_corrected.Rd
Convert raw counts data into spectral transmittance or spectral reflectance.
Usage
s_fraction_corrected(x, ...)
# Default S3 method
s_fraction_corrected(x, ...)
# S3 method for class 'list'
s_fraction_corrected(
x,
reference.value = 1,
type = "internal",
time = NULL,
correction.method,
qty.out = "Tfr",
descriptor = NULL,
dyn.range = NULL,
locale = NULL,
verbose = getOption("photobiology.verbose", default = FALSE),
...
)
# S3 method for class 'raw_mspct'
s_fraction_corrected(
x,
spct.names = c(sample = "sample", reference = "reference", dark = "dark"),
reference.value = 1,
type = switch(qty.out, Tfr = "internal", Rfr = "total"),
correction.method,
dyn.range = NULL,
qty.out = "Tfr",
verbose = getOption("photobiology.verbose", default = FALSE),
...
)
Arguments
- x
A named list of one to three vectors of file names, with names "sample", "reference", and "dark". Or a raw_mspt object, or a raw_spct object.
- ...
Named argument passed to
photobiology::cps2irrad
which is the final calculation step.- reference.value
numeric or filter_spct or reflector_spct object, with the fractional transmittance or reflectance of the reference.
- type
character One of "internal" or "total".
- time
a
POSIXct
object, but ifNULL
the date stored in file is used, and ifNA
no date variable is added- correction.method
A named list of constants and functions defining the method to be sued for stray light and dark signal corrections.
- qty.out
character, one of "Tfr", "Rfr".
- descriptor
A named list with a descriptor of the characteristics of the spectrometer (if serial number does not agree an error is triggered).
- dyn.range
numeric Effective dynamic range of the spectrometer.
- locale
The locale controls defaults that vary from place to place. The default locale is US-centric (like R), but you can use
locale
to create your own locale that controls things like the default time zone, encoding, decimal mark, big mark, and day/month names.- verbose
Logical indicating the level of warnings wanted.
- spct.names
named character vector of length three, to map names in
x
to those expected.
Methods (by class)
s_fraction_corrected(default)
: Default for generic function.s_fraction_corrected(list)
: Default for generic function.s_fraction_corrected(raw_mspct)
: Default for generic function.
Note
Currently s_fraction_corrected.list
allows processing of files
written by OceanOptics' SpectraSuite software, from protocols with
integration-time bracketing or not, with a dark reference measurement or
not. Four measurements components are recognized: a "sample" measurement,
a "referenece" measurement using a clear or white, a "filter" measurement
with a UV-blocking filter in the light pass, and a "dark" measurement.
Only "sample" and "reference" are mandatory. Data should be raw counts,
either corrected for detector non-linearity or not. All three spectra
should be acquired using the same instrument settings to achieve good
accuracy.
See also
Other functions for conversion of raw-counts data:
raw2corr_cps()
,
raw2cps()
,
s_irrad_corrected()