Oplecorr: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Neal
imported>Neal
Line 65: Line 65:
   \mathbf{1} & \lambda  & {{\lambda }^{2}}  \\
   \mathbf{1} & \lambda  & {{\lambda }^{2}}  \\
\end{matrix} \right]\text{    (3)}</math>
\end{matrix} \right]\text{    (3)}</math>
where <math>\lambda</math> is the wavelength (or frequency) axis. However, it should be clear that <math>\mathbf{P}</math> is a matrix with columns that span physical artifacts not subject to closure.
where <math>\lambda</math> is the wavelength (or frequency) axis. However, it should be clear that <math>\mathbf{P}</math> is a matrix with columns that span physical artifacts not subject to closure. The <math>\mathbf{m}^{th}</math> measured signal, <math>\mathbf{x}_{\mathit{m}}</math>, <math>\mathit{m}=1,...,\mathit{M}</math>, orthogonal to <math>\mathbf{P}</math> is
:<math>{{\mathbf{z}}_{m}}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right){{\mathbf{x}}_{m}}={{a}_{m}}\mathbf{K}{{\mathbf{c}}_{m}}+\mathbf{e}_{m}^{*}\text{    (4)}</math>
where <math>{{\mathbf{P}}^{\dagger }}=\mathbf{P}{{\left( {{\mathbf{P}}^{T}}\mathbf{P} \right)}^{-1}}</math>, <math>\mathbf{K}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right)\mathbf{S}</math>, and <math>{{\mathbf{e}}^{*}}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right)\mathbf{e}</math>.
The measurements can be collected into a matrix <math>\mathbf{Z}</math> and it is recognized that a basis for the <math>\mathit{M}</math> measurements, <math>\mathbf{Z}_{\mathit{b}}</math>, can be obtained from a subset of  linearly independent measurements. Partitioning <math>\mathbf{Z}</math> into the basis and remaining measurements, <math>\mathbf{Z}_{\mathit{r}}</math>, gives


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


[[emscorr]], [[mscorr]], [[stdfir]]
[[emscorr]], [[mscorr]], [[stdfir]]

Revision as of 12:17, 17 December 2013

Purpose

Optical path-length estimation and correction with closure constraints.

Synopsis

model = oplecorr(x,y,ncomp,options); %identifies model (calibration)
sx = oplecorr(x,model,options); %applies the model

Description

The OPLEC model is similar to EMSC but doesn't require esimates of the pure spectra for filtering. Instead it assumes closure on the chemical analyte contributions and the use of a non-chemical signal basis P defined by the input (options.order). For example, if options.order = 2, then P = [1, (1:n)', (1:n)'.^2] to account for offset, slope and curvature in the baseline.

Inputs

  • x = X-block (2-way array class "double" or "dataset"), and
  • ncomp = number of components to to be calculated (positive integer scalar).

1) Calibration: model = oplecorr(x,y,ncomp,options);

  • x = M by N matrix of spectra (class "double" or "dataset").
  • y = M by 1 matrix of known reference values.
  • ncomp = number of components to to be used for the basis Z (positive integer scalar).
  • options = an optional input structure array described below.

2) Apply: sx = oplecorr(x,model,options);

  • x =M by N matrix of spectra to be correctected .
  • model = oplecorr model.

Outputs

  • model = oplecorr model is a model structure with the following fields (see Standard Model Structure for additional information):
  • modeltype: 'OPLECORR',
  • datasource: structure array with information about input data,
  • date: date of creation,
  • time: time of creation, ...
and
  • sx = a M by N matrix of filtered ("corrected") spectra.

Options

options = a structure array with the following fields:

  • display: [ {'off'}| 'on' ] governs level of display to the command window.
  • order: defines the order of polynomial to describe 'non-chemical' signal due to physical artifacts.
Alternatively, (order) can be a N by Kp matrix corresponding to basis vectors to account for non-chemical signal.
This portion of the signal is not included in the closure constraint. See Algorithm for a more complete description.
  • center: [ {false} | true] governs mean-centering of the PLS model that regresses the corrections factors (model.b). No centering (the default) results in a force fit through zero.

Algorithm

The OPLEC algorithm is based on the work Z-P Chen, J Morris, E Martin, “Extracting Chemical Information from Spectral Data with Multiplicative Light Scattering Effects by Optical Path-Length Estimation and Correction,” Anal. Chem., 78, 7674-7681 (2006). OPLEC is similar to extended multiplicative scatter correction (EMSC) except that it incorporates closure in the signal due to chemical analytes.

It is assumed that the measured signal, can be modeled as

where is a column vector, is a matrix with columns corresponding to analyte spectra, is a vector of contributions, is a matrix with columns corresponding to physical artifacts in the spectra and is a vector corresponding scores (or contributions for the artifacts). The factor is a multiplicative factor (e.g. due to changes in path-length) identified by the OPLEC algorithm. The analyte contributions are subject to closure such that

Closure also implies that the contributions are non-negative. It is assumed that the contributions to the first analyte are known (i.e., the column vector is known). It is also assumed that the matrix can be modeled a priori. Examples for physical artifacts include an offset, slope and curvature of the baseline that can be accounted for by the basis

where is the wavelength (or frequency) axis. However, it should be clear that is a matrix with columns that span physical artifacts not subject to closure. The measured signal, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{x}_{\mathit{m}}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathit{m}=1,...,\mathit{M}} , orthogonal to Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{P}} is

Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle {{\mathbf{z}}_{m}}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right){{\mathbf{x}}_{m}}={{a}_{m}}\mathbf{K}{{\mathbf{c}}_{m}}+\mathbf{e}_{m}^{*}\text{ (4)}}

where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle {{\mathbf{P}}^{\dagger }}=\mathbf{P}{{\left( {{\mathbf{P}}^{T}}\mathbf{P} \right)}^{-1}}} , Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{K}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right)\mathbf{S}} , and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle {{\mathbf{e}}^{*}}=\left( \mathbf{I}-{{\mathbf{P}}^{\dagger }}{{\mathbf{P}}^{T}} \right)\mathbf{e}} . The measurements can be collected into a matrix Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{Z}} and it is recognized that a basis for the Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathit{M}} measurements, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{Z}_{\mathit{b}}} , can be obtained from a subset of linearly independent measurements. Partitioning Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{Z}} into the basis and remaining measurements, Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathbf{Z}_{\mathit{r}}} , gives

See Also

emscorr, mscorr, stdfir