prep.msc | R Documentation |
Applies Multiplicative Scatter Correction (MSC) transformation to data matrix (spectra)
prep.msc(data, mspectrum = NULL)
data |
a matrix with data values (spectra) |
mspectrum |
mean spectrum (if NULL will be calculated from |
MSC is used to remove scatter effects (baseline offset and slope) from spectral data, e.g. NIR spectra.
@examples
### Apply MSC to spectra from simdata
library(mdatools) data(simdata)
spectra = simdata$spectra.c cspectra = prep.msc(spectra)
par(mfrow = c(2, 1)) mdaplot(spectra, type = "l", main = "Before MSC") mdaplot(cspectra, type = "l", main = "After MSC")
preprocessed spectra (calculated mean spectrum is assigned as attribut 'mspectrum')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.