Emscorr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Scott
(New page: ===Purpose=== Extended multiplicative scatter correction (EMSC) preprocessing. ===Synopsis=== :[sx,fx,xref,reg,res] = emscorr(x,xref,options) ===Description=== EMSCORR attempts to rem...)
 
imported>Scott
Line 9: Line 9:
===Description===
===Description===


EMSCORR attempts to remove additive and multiplicative scattering effects in spectra. This can be thought of as a filter where some portions of the signal are passed and some are rejected. The input (x) is a MxN matrix (class "double") of M spectra measured at N channels. Each row of (x) is regressed against input (xref) and the results are used to 'correct' (x). If (xref) is not input then mean(x) is used.
EMSCORR attempts to remove additive and multiplicative scattering effects in spectra. This can be thought of as a filter where some portions of the signal are passed and some are rejected. The input <tt>x</tt> is a MxN matrix (class "double") of M spectra measured at N channels. Each row of <tt>x</tt> is regressed against input <tt>xref</tt> and the results are used to 'correct' <tt>x</tt>. If <tt>xref</tt> is not input then <tt>mean(x)</tt> is used.


There are several options to allow for weighted least squares (i.e. to de-weight channels that should not be included in the regression), including different spectra that should be filtered out, and including spectra that should not be filtered out.
There are several options to allow for weighted least squares (i.e. to de-weight channels that should not be included in the regression), including different spectra that should be filtered out, and including spectra that should not be filtered out.


The outputs are (sx) the corrected spectra, (fx) the signal that was filtered out, and (xref) the reference spectrum. Outputs (reg) are the regression coefficients and (res) is a MxN matrix of residuals. For non-windowed filtering, (reg) is [number of coefficients] x M. The number of coefficients corresponds to the number of basis vectors included in the correction. The coefficients are ordered according to the following basis: xbase = [xref, 1 x x2 ..., options.p, options.s]. If a windowed filter is used, (reg) is [number of coefficients] x N x M. where mode 2 corresponds to the windows.
The outputs are <tt>sx</tt> the corrected spectra, <tt>fx</tt> the signal that was filtered out, and <tt>xref</tt> the reference spectrum. Outputs <tt>reg</tt> are the regression coefficients and <tt>res</tt> is a MxN matrix of residuals. For non-windowed filtering, <tt>reg</tt> is [number of coefficients] x M. The number of coefficients corresponds to the number of basis vectors included in the correction. The coefficients are ordered according to the following basis: <tt>xbase = [xref, 1 x x2 ..., options.p, options.s]</tt>. If a windowed filter is used, <tt>reg</tt> is [number of coefficients] x N x M. where mode 2 corresponds to the windows.


====Inputs====
====Inputs====

Revision as of 17:10, 15 October 2008

Purpose

Extended multiplicative scatter correction (EMSC) preprocessing.

Synopsis

[sx,fx,xref,reg,res] = emscorr(x,xref,options)

Description

EMSCORR attempts to remove additive and multiplicative scattering effects in spectra. This can be thought of as a filter where some portions of the signal are passed and some are rejected. The input x is a MxN matrix (class "double") of M spectra measured at N channels. Each row of x is regressed against input xref and the results are used to 'correct' x. If xref is not input then mean(x) is used.

There are several options to allow for weighted least squares (i.e. to de-weight channels that should not be included in the regression), including different spectra that should be filtered out, and including spectra that should not be filtered out.

The outputs are sx the corrected spectra, fx the signal that was filtered out, and xref the reference spectrum. Outputs reg are the regression coefficients and res is a MxN matrix of residuals. For non-windowed filtering, reg is [number of coefficients] x M. The number of coefficients corresponds to the number of basis vectors included in the correction. The coefficients are ordered according to the following basis: xbase = [xref, 1 x x2 ..., options.p, options.s]. If a windowed filter is used, reg is [number of coefficients] x N x M. where mode 2 corresponds to the windows.

Inputs

  • first = first input is this.

Optional Inputs

  • second = optional second input is this.

Outputs

  • firstout = first output is this.

Options

options = a structure array with the following fields:

  • plots: [ {'none'} | 'final' ] governs plotting of results, and
  • order: positive integer for polynomial order {default = 1}.

Example

>>This is an example
Error: does not exist

See Also

baselinew, deresolv