Remove or interpolate scattering signal in individual FEEM objects, FEEM cube objects, or lists of them.
feemscatter(x, …)
# S3 method for list
feemscatter(x, …)
# S3 method for feemcube
feemscatter(x, …)
# S3 method for feem
feemscatter(
x, widths, method = c("omit", "pchip", "loess"),
add.zeroes = 30, Raman.shift = 3400, …
)
An individual FEEM object, FEEM cube object, or a list of them, to handle the scattering signal in.
A numeric vector of length 4 containing the widths (in nm) of the scattering signal, in the following order:
Rayleigh scattering
Raman scattering
Rayleigh scattering, \(2 \lambda\)
Raman scattering, \(2 \lambda\)
Set a width to \(0\) if you don't want to handle this particular kind of scattering signal.
A string choosing how to handle the scattering signal:
"omit"
Replace it with NA
"pchip"
Interpolate it line-by-line using piecewise cubic Hermitean
polynomials (pchip
).
"loess"
Interpolate it by fitting a locally weighted polynomial surface
(loess
). In this case the remaining parameters are
passed verbatim to loess
, which may be used to set
parameters such as span
.
Set intensities at
\(\lambda_{em} < \lambda_{ex} - \mathtt{add.zeroes}\:\mathrm{nm}\) to \(0\) unless they have been measured. Set to NA
to
disable this behaviour.
Raman shift of the scattering signal of water, \(\textrm{cm}^{-1}\).
Passed verbatim from feemscatter
generics to
feemscatter.feem
. If "loess"
method is selected,
remaining options are passed to loess
(the span
parameter is of particular interest there).
An object of the same kind (FEEM object / FEEM cube / list of them) with scattering signal handled as requested.
The "pchip"
method is implemented as described in the article
by Bahram et al., 2006 (see the reference below): each emission
spectrum at different excitation wavelengths is considered one by one.
The last excitation spectrum (highest emission wavelength) is
interpolated first to handle the corner case of extrapolating
\(2 \lambda\) scattering near the high end of the emission
wavelength range. Zero-valued points are inserted at the lowest
emission wavelength (unless the data is already present) to prevent
the extrapolation from blowing up.
The "loess"
method feeds the whole FEEM except the area to be
interpolated to loess
, then asks it to predict the
remaining part of the spectum.
M. Bahram, R. Bro, C. Stedmon, A. Afkhami, Handling of Rayleigh and Raman scatter for PARAFAC modeling of fluorescence data using interpolation, Journal of Chemometrics. 20 (2006) 99-105. 10.1002/cem.978
# NOT RUN {
data(feems)
plot(x <- feemscatter(
feems[[1]], widths = c(25, 25, 20, 20), method = "loess", Raman.shift = 3500,
span = .03, control = loess.control(trace.hat = 'approximate')
))
# }
Run the code above in your browser using DataLab