Corrspec: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
imported>Jeremy
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
===Purpose===
===Purpose===


Line 6: 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,index,''options'')
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,model,options)
:[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,model,''options'')


===Description===
===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.
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.
See [[Corrspecgui| Correlation Spectroscopy GUI]] for information on the interactive interface to this function.


====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.
:The third argument is one of the following:
 
:ncomp : scalar, function will calculate first n resolved pure components.
====Outputs====
:index : ''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.
 
: model : a model created by corrspec or corrspecgui. The model is used to calculate estimated xspec from yspec and vice versa. One of the arguments xspec and yspec can be empty.
* '''purintx''' : resolved x contributions('concentrations').
: options : see below.
 
* '''purinty''' : resolved y contributions('concentrations').
 
* '''purspecx''' : resolved x pure component spectra.
 
* '''purspecy''' : resolved y pure component spectra.
 
* '''map''' : cell with ncomp resolved dispersion matrixes, each with
 
*  '''size''': size(yspec,2)\*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 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.


===Options===
===Options===


* '''plots_spectra''' : ['off'|{'on'}] governs level of plotting for spectra.
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


* '''plots_maps''' : ['off'|{'on'}] governs level of plotting for maps.
====Outputs====
 
* '''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:
:purintx : resolved x contributions("concentrations").


*  '''1''': standardized, offset corrected
:purinty : resolved y contributions("concentrations").


*  '''2''': length sqrt(nrows), offset corrected
:purspecx : resolved x pure component spectra.


*  '''3''': purity about mean, offset corrected
:purspecy : resolved y pure component spectra.


*  '''4''': purity about origin, offset corrected
:map : cell array with ncomp resolved dispersion matrixes, each with size [size(yspec,2) by size(xspec,2)]


*  '''5''': asynchronous, offset corrected
: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===
===Examples===


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


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


[[corrspecengine]], [[dispmat]], [[purity]]
[[corrspecengine]], [[corrspecgui]], [[dispmat]], [[purity]]

Latest revision as of 15:55, 9 June 2014

Purpose

Resolves correlation spectroscopy maps.

Synopsis

model = corrspec(xspec,yspec,ncomp,options)
[purintx,purinty,purspecx,purspecy,maps] = corrspec(xspec,yspec,index,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.

See Correlation Spectroscopy GUI for information on the interactive interface to this function.

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.
The third argument is one of the following:
ncomp : scalar, function will calculate first n resolved pure components.
index : 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.
model : a model created by corrspec or corrspecgui. The model is used to calculate estimated xspec from yspec and vice versa. One of the arguments xspec and yspec can be empty.
options : see below.

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, corrspecgui, dispmat, purity