Corrspec: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
No edit summary
imported>Neal
No edit summary
Line 5: Line 5:
===Synopsis===
===Synopsis===


:[model] = corrspec(xspec,yspec,ncomp,options)
:model = corrspec(xspec,yspec,ncomp,''options'')
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,idex,options)
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,idex,''options'')
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,model,options)
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,model,''options'')


===Description===
===Description===
Line 15: Line 15:
====Inputs====
====Inputs====


* '''xspec''' : (2-way array class "double" or "dataset") x-matrix for dispersion matrix.
:xspec : (2-way array class "double" or "dataset") x-matrix for dispersion matrix.


* '''yspec''' : (2-way array class "double" or "dataset") y-matrix for dispersion matrix.
:yspec : (2-way array class "double" or "dataset") y-matrix for dispersion matrix.


* '''ncomp''' : (scalar or n x 2 matrix) if ncomp = scalar then function will calculate first n resolved pure purity components. If ncomp = n x 2 matrix, each row indicates the x and y position (index) to calculate the purity solution. If empty, the initial matrices will be calculated.
:ncomp : (scalar or ''N''x2 matrix) if (ncomp) is a scalar then CORRSPEC will estimate the first ncomp "purity" components. If (ncomp) is an ''N''x2 matrix, each row indicates the X- and Y-position (i.e., index) to estimate the purity solution. If (ncomp) is empty [ ], the initial matrices will be estimated by CORRSPEC.


====Outputs====
===Options===


* '''purintx''' : resolved x contributions('concentrations').
Optional input ''options'' is a structure array with the following fields:
:plots_spectra : [ 'off' |{ 'on'} ] governs level of plotting for spectra.
:plots_maps : [ 'off' | {'on'} ] governs level of plotting for maps.
:offset : noise correction factor. If (offset) is a scalar, it defines the offset for both x and y. If (offset) is a two element vector it defines the offset for for x and y respectively.
inactivate : [ ] logical matrix of indices not to be used in purity calculation.
:dispersion : [1] See (max) (below).
:max : [3] If not given, only weight matrix will be calculated, otherwise select one of the options below:
:: max = 1: standardized, offset corrected
:: max = 2: length sqrt(nrows), offset corrected
:: max = 3: purity about mean, offset corrected
:: max = 4: purity about origin, offset corrected
:: max = 5: asynchronous, offset corrected


* '''purinty''' : resolved y contributions('concentrations').
====Outputs====


* '''purspecx''' : resolved x pure component spectra.
:purintx : resolved x contributions("concentrations").


* '''purspecy''' : resolved y pure component spectra.
:purinty : resolved y contributions("concentrations").


* '''map''' : cell with ncomp resolved dispersion matrixes, each with
:purspecx : resolved x pure component spectra.


*  '''size''': size(yspec,2)\*size(xspec,2)
:purspecy : resolved y pure component spectra.


* '''model''' : standard model structure, used for prediction (same pure variables on other data set) and add components to the model. The series of correlation maps resulting from the sequential elimination of components is stored in the field detail.matrix. See function corrspecengine for detailed description of matrix. The series of resolved correlation maps is stored in field detail.maps. Once a model has been calculated it can be used to predict x spectra from y spectra and vice versa.
:map : cell array with ncomp resolved dispersion matrixes, each with size [size(yspec,2) by size(xspec,2)]
 
===Options===


* '''plots_spectra''' : ['off'|{'on'}] governs level of plotting for spectra.
:model : standard model structure, used for prediction (same pure variables on other data set) and add components to the model. The series of correlation maps resulting from the sequential elimination of components are stored in the field (.detail.matrix). See CORRSPECENGINE for detailed description of (matrix). The series of resolved correlation maps is stored in field (.detail.maps). Once a model has been calculated it can be used to predict x spectra from y spectra and vice versa.
* '''plots_maps''' : ['off'|{'on'}] governs level of plotting for maps.
* '''offset''' : noise correction factor. One element defines offset for both x and y, two elements separately for x and y.
* '''inactivate''' : [ ] logical matrix of indices not to be used in purity calculation.
* '''dispersion''' : [1] See max (below).
* '''max''' : [3] If not given, only weight matrix will be calculated, otherwise select one of the options below:
**  '''1''': standardized, offset corrected
**  '''2''': length sqrt(nrows), offset corrected
**  '''3''': purity about mean, offset corrected
**  '''4''': purity about origin, offset corrected
**  '''5''': asynchronous, offset corrected


===Examples===
===Examples===

Revision as of 15:04, 7 October 2008

Purpose

Resolves correlation spectroscopy maps.

Synopsis

model = corrspec(xspec,yspec,ncomp,options)
[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,idex,options)
[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,model,options)

Description

CORRSPEC resolves a correlation map of two spectroscopies into the maps of individual components, their associated resolved spectra and the contributions ("concentrations") of the components in the original mixture spectra.

Inputs

xspec : (2-way array class "double" or "dataset") x-matrix for dispersion matrix.
yspec : (2-way array class "double" or "dataset") y-matrix for dispersion matrix.
ncomp : (scalar or Nx2 matrix) if (ncomp) is a scalar then CORRSPEC will estimate the first ncomp "purity" components. If (ncomp) is an Nx2 matrix, each row indicates the X- and Y-position (i.e., index) to estimate the purity solution. If (ncomp) is empty [ ], the initial matrices will be estimated by CORRSPEC.

Options

Optional input options is a structure array with the following fields:

plots_spectra : [ 'off' |{ 'on'} ] governs level of plotting for spectra.
plots_maps : [ 'off' | {'on'} ] governs level of plotting for maps.
offset : noise correction factor. If (offset) is a scalar, it defines the offset for both x and y. If (offset) is a two element vector it defines the offset for for x and y respectively.

inactivate : [ ] logical matrix of indices not to be used in purity calculation.

dispersion : [1] See (max) (below).
max : [3] If not given, only weight matrix will be calculated, otherwise select one of the options below:
max = 1: standardized, offset corrected
max = 2: length sqrt(nrows), offset corrected
max = 3: purity about mean, offset corrected
max = 4: purity about origin, offset corrected
max = 5: asynchronous, offset corrected

Outputs

purintx : resolved x contributions("concentrations").
purinty : resolved y contributions("concentrations").
purspecx : resolved x pure component spectra.
purspecy : resolved y pure component spectra.
map : cell array with ncomp resolved dispersion matrixes, each with size [size(yspec,2) by size(xspec,2)]
model : standard model structure, used for prediction (same pure variables on other data set) and add components to the model. The series of correlation maps resulting from the sequential elimination of components are stored in the field (.detail.matrix). See CORRSPECENGINE for detailed description of (matrix). The series of resolved correlation maps is stored in field (.detail.maps). Once a model has been calculated it can be used to predict x spectra from y spectra and vice versa.

Examples

load data_mid_IR
load data_near_IR 
corrspec(data_mid_IR,data_near_IR,4) 

See Also

corrspecengine, dispmat, purity