Wavelength Binning In order to reduce the spectral resolution and thus gain signal to noise ratio or to reduce the dimensionality of the spectral data set, the spectral resolution can be reduced.
The mean of every by
data points in the spectra is calculated.
spc.bin(spc, by = stop("reduction factor needed"), na.rm = TRUE, ...)
spc |
the |
by |
reduction factor |
na.rm |
decides about the treatment of if if if |
... |
ignored |
Using na.rm = TRUE
always takes about twice as long as na.rm = FALSE
.
If the spectra matrix does not contain too many NA
s, na.rm = 2
is faster than
na.rm = TRUE
.
A hyperSpec
object with ceiling (nwl (spc) / by)
data points per spectrum.
C. Beleites
spc <- spc.bin (flu, 5) plot (flu[1,,425:475]) plot (spc[1,,425:475], add = TRUE, col = "blue") nwl (flu) nwl (spc)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.