Mscorr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Scott
Line 1: Line 1:
===Purpose===
===Purpose===


Line 22: Line 21:
For input spectra '''x''' (1x''N'') and reference spectra '''x'''<sub>ref</sub> (1x''N'') the model is:
For input spectra '''x''' (1x''N'') and reference spectra '''x'''<sub>ref</sub> (1x''N'') the model is:


'''x'''<sup>T</sup>? + ? = '''x'''<sup>T</sup><sub>ref</sub> .
<math>x^{T}\beta +\alpha =x_{ref}^{T}</math>
 


and the corrected spectra '''x'''<sub>s</sub> (1x''N'') is given by:
and the corrected spectra '''x'''<sub>s</sub> (1x''N'') is given by:


'''x'''<sub>s</sub> = ('''x'''<sub>ref</sub> -?)/? .
 
<math>x_{S}=(x_{ref}-\alpha )/\beta </math>


===See Also===
===See Also===


[[frpcr]], [[stdfir]], [[stdgen]]
[[frpcr]], [[stdfir]], [[stdgen]]

Revision as of 17:05, 7 October 2008

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:


See Also

frpcr, stdfir, stdgen