Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

msc

Multiplicative Scatter Correction (msc)


Description

Maturing lifecycle

This function implements the multiplicative scatter correction method which attempts to remove physical light scatter by accounting for additive and multiplicative effects (Geladi et al., 1985).

Usage

msc(X, reference_spc = colMeans(X))

Arguments

X

a numeric matrix of spectral data.

reference_spc

a numeric vector corresponding to an "ideal" reference spectrum (e.g. free of scattering effects). By default the function uses the mean spectrum of the input X. See details.

Details

The Multiplicative Scatter Correction (MSC) is a normalization method that attempts to account for additive and multiplicative effects by aligning each spectrum (\(x_i\)) with an ideal reference one (\(x_r\)) as follows:

where \(a_i\) and \(m_i\) are the additive and multiplicative terms respectively.

Value

a matrix of normalized spectral data with an attribute which indicates the reference spectrum used.

Author(s)

Leonardo Ramirez-Lopez and Guillaume Hans

References

Geladi, P., MacDougall, D., and Martens, H. 1985. Linearization and Scatter-Correction for Near-Infrared Reflectance Spectra of Meat. Applied Spectroscopy, 39(3):491-500.

See Also

Examples

data(NIRsoil)
NIRsoil$msc_spc <- msc(X = NIRsoil$spc)
# 10 first snv spectra
matplot(
  x = as.numeric(colnames(NIRsoil$msc_spc)),
  y = t(NIRsoil$msc_spc[1:10, ]),
  type = "l",
  xlab = "wavelength, nm",
  ylab = "msc"
)

prospectr

Miscellaneous Functions for Processing and Sample Selection of Spectroscopic Data

v0.2.1
MIT + file LICENSE
Authors
Antoine Stevens [aut, cre] (<https://orcid.org/0000-0002-1588-7519>), Leonardo Ramirez-Lopez [aut, cre] (<https://orcid.org/0000-0002-5369-5120>), Guillaume Hans [ctb] (<https://orcid.org/0000-0002-6503-5760>)
Initial release
2020-10-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.