Mscorr
From Eigenvector Documentation Wiki
Contents |
Purpose
Multiplicative scatter/signal correction (MSC).
Synopsis
- [sx,alpha,beta,xref] = mscorr(x,xref,mc,win,specmode,subind)
Description
MSCORR performs multiplicative scatter correction (a.k.a. multiplicative signal correction) on an input matrix of spectra x (class "double") regressed against a reference spectra xref (class "double"). If (xref) is empty or omitted, the mean of (x) is used as the reference.
If the optional input mc is 1 {default} then an intercept is used. If mc is set to 0 (zero) then a force fit through zero is used.
Optional input win is a NK element cell array of indices corresponding to windows to perform MSC, i.e. MSC is performed in each window win{i} for i=1:NK. In this case, (alpha and beta are not assigned). Optional input (specmode) defines which mode of the data is the spectral mode (default = 2) and is only used when (x) contains 3 or more modes. Optional input (subind) specifies the indices within the included spectral variables that are used to calculate the MSC correction factors (alpha and beta); default is that ALL included spectral variables are used.
Outputs are the corrected spectra sx, the intercepts/offsets alpha, the multiplicative scatter factor/slope beta, and the reference spectrum xref.
Algorithm
For input spectra x (1xN) and reference spectra xref (1xN) the model is:
and the corrected spectra xs (1xN) is given by:
xS = (xref − α) / β