These functions return a spectral object of the same class as the one supplied as argument but with the spectral data on a shifted scale. A range of wavelengths is taken a reference (zero or another numeric constant) and a summary is calculated for this waveband. The difference between the computed and reference value are used to shift the scale so that these two values match in the returned object.
fshift(x, ...)# S3 method for source_spct
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
...)
# S3 method for response_spct
fshift(x, range = c(min(x), min(x) + 10),
f = "mean", unit.out = getOption("photobiology.radiation.unit", default =
"energy"), ...)
# S3 method for filter_spct
fshift(x, range = c(min(x), min(x) + 10), f = "min",
qty.out = getOption("photobiology.filter.qty", default = "transmittance"),
...)
# S3 method for reflector_spct
fshift(x, range = c(min(x), min(x) + 10),
f = "min", qty.out = NULL, ...)
# S3 method for source_mspct
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
unit.out = getOption("photobiology.radiation.unit", default = "energy"),
...)
# S3 method for raw_spct
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
qty.out = NULL, ...)
# S3 method for cps_spct
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
qty.out = NULL, ...)
# S3 method for generic_spct
fshift(x, range = c(min(x), min(x) + 10), f = "mean",
col.names, ...)
# S3 method for response_mspct
fshift(x, range = c(min(x), min(x) + 10),
f = "mean", unit.out = getOption("photobiology.radiation.unit", default =
"energy"), ..., .parallel = FALSE, .paropts = NULL)
# S3 method for filter_mspct
fshift(x, range = c(min(x), min(x) + 10), f = "min",
qty.out = getOption("photobiology.filter.qty", default = "transmittance"),
..., .parallel = FALSE, .paropts = NULL)
# S3 method for reflector_mspct
fshift(x, range = c(min(x), min(x) + 10),
f = "min", qty.out = NULL, ..., .parallel = FALSE, .paropts = NULL)
# S3 method for raw_mspct
fshift(x, range = c(min(x), min(x) + 10), f = "min",
..., .parallel = FALSE, .paropts = NULL)
# S3 method for cps_mspct
fshift(x, range = c(min(x), min(x) + 10), f = "min",
..., .parallel = FALSE, .paropts = NULL)
# S3 method for generic_mspct
fshift(x, range = c(min(x), min(x) + 10), f = "min",
col.names, ..., .parallel = FALSE, .paropts = NULL)
An R object
additional named arguments passed down to f
.
An R object on which range()
returns a numeric vector of
length 2 with the limits of a range of wavelengths in nm, with min and max
wavelengths (nm)
character string "mean", "min" or "max" for scaling so that this
summary value becomes the origin of the spectral data scale in the returned
object, or the name of a function taking x
as first argument and
returning a numeric value.
character Allowed values "energy", and "photon", or its alias "quantum"
character Allowed values "transmittance", and "absorbance"
character vector containing the names of columns or variables to which to apply the scale shift.
if TRUE, apply function in parallel, using parallel backend provided by foreach
a list of additional options passed into the foreach function when parallel computation is enabled. This is important if (for example) your code relies on external data or packages: use the .export and .packages arguments to supply them so that all cluster nodes have the correct environment set up for computing.
A copy of x
with the spectral data values replaced with values
zero-shifted.
source_spct
:
response_spct
:
filter_spct
:
reflector_spct
:
source_mspct
:
raw_spct
:
cps_spct
:
generic_spct
:
response_mspct
:
filter_mspct
:
reflector_mspct
:
raw_mspct
:
cps_mspct
:
generic_mspct
:
Other rescaling functions: fscale
,
getNormalized
, is_normalized
,
is_scaled
, normalize
,
setNormalized
, setScaled