Caltransfer: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Scott
 
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
===Purpose===
===Purpose===
Create or apply calibration and instrument transfer models.
Create or apply calibration and instrument transfer models.
===Synopsis===
===Synopsis===
:[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,options)
 
:x2t = caltransfer(x2,transfermodel,options)
:[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,''options'')
:[transfermodel,x1t,{x2t_1 x2t_2 x2t_3}] =  
:x2t = caltransfer(x2,transfermodel,''options'')
: caltransfer(x1,{{x2_1 x2_2 x2_3},method,options)
:[transfermodel,x1t,{x2t_1 x2t_2 x2t_3}] = caltransfer(x1,{{x2_1 x2_2 x2_3},method,''options'')
:{x2t_1 x2t_2 x2t_3} =  
:{x2t_1 x2t_2 x2t_3} = caltransfer({x2_1 x2_2 x2_3},transfermodel,''options'')
: caltransfer({x2_1 x2_2 x2_3},transfermodel,options)
 
===Description===
===Description===
CALTRANSFER uses one of the several transfer functions (methods) available in PLS_Toolbox to return a model and transformed data. The exact I/O is dictated by the transfer function (method) used.
CALTRANSFER uses one of the several transfer functions (methods) available in PLS_Toolbox to return a model and transformed data. The exact I/O is dictated by the transfer function (method) used.
INPUTS:
 
* x1 = (2-way array class "double" or "dataset") calibration data (e.g., spectra from the standard instrument).  
====Inputs====
* x2 = (2-way array class "double" or "dataset") data to be transformed (e.g., spectra from the instrument to be standardized).
 
* method = (string) indicating which calibration transfer function (method) to use.
:x1 = (2-way array class "double" or "dataset") calibration data (e.g., spectra from the standard instrument).  
Choices are:
 
*  'ds' : Direct Standardization
:x2 = (2-way array class "double" or "dataset") data to be transformed (e.g., spectra from the instrument to be standardized).
*  'pds' : Piecewise Direct Standardization
 
*  'dwpds' : Double Window Piecewise Direct Standardization
:method = (string) indicating which calibration transfer function (method) to use.
*  'glsw' : Generalized Least-Squares Weighting
 
*  'osc' : Orthogonal Signal Correction
::Choices are:
*  'alignmat' : Matrix Alignment
 
OUTPUTS:
::ds : Direct Standardization
* transfermodel = standard model structure containing the Calibration Transfervmodel (See MODELSTRUCT).
 
* x1t = Calibration data returned. Depending on the type of calibration function (method) used this may or may not be transformed from the input data (x1).
::pds : Piecewise Direct Standardization
* x2t = Transformed data.
 
::dwpds : Double Window Piecewise Direct Standardization
 
::glsw : Generalized Least-Squares Weighting
 
::osc : Orthogonal Signal Correction
 
::alignmat : Matrix Alignment
 
====Outputs====
 
:transfermodel = standard model structure containing the Calibration Transfervmodel (See [[Standard Model Structure]]).
 
:x1t = Calibration data returned. Depending on the type of calibration function (method) used this may or may not be transformed from the input data (x1).
 
:x2t = Transformed data.
 
===Options===
===Options===
* options  = structure array with the following fields:
 
* display :  [ 'off' | {'on'} ] governs level of display to command window.
options  = structure array with the following fields:
* blockdetails : [ 'compact' | {'standard'} | 'all' ] extent of data included in model. 'standard' = none, 'all' x-block.
 
* preprocessing : {[] []} Preprocessing structures for x and y blocks (see PREPROCESS).
*'''display''' :  [ 'off' | {'on'} ] governs level of display to command window.
NOTE: There are sub structures for each 'method'. These sub structures include both the input parameters (any additional inputs needed by the function) as well as optional inputs (the options structure for that particular function). For more information on inputs to each method see the help for that function (e.g., help stdgen). Examples of using the substructures:
 
*
*'''blockdetails''' : [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
* Example: OSC requires a "y" block in addition to x1 and x2. The y-block should be assigned via the options structure:
:* ‘Standard’ = does not include x1 & x2 datasets in the model ('model.detail.data').
opts.osc.y = yblock;
:* ‘Compact’ = for this function, 'compact' is identical to 'standard'.
* Example: To assign window widths for DWPDS:
:* 'All' = include both x1 & x2 datasets in the model.
options.dwpds.win = [5 3];
 
*'''preprocessing''' : {[] []} Preprocessing structures for instrument 1 and instrument 2 x-blocks (see PREPROCESS). Note that it is usual in PLS_Toolbox for the preprocessing{2} structure to hold the Y-block preprocessing. But caltransfer does not use a Y-block so instead preprocessing{2} is used to hold the Instrument 2 X-block preprocessing.
 
NOTE: There are sub-structures for each 'method'. These sub structures include both the input parameters (any additional inputs needed by the function) as well as optional inputs (the options structure for that particular function). For more information on inputs to each method see the help for that function (e.g., help stdgen). Examples of using the substructures:
 
===Example===
 
OSC requires a y-block in addition to (x1) and (x2). The y-block should be assigned via the options structure:
 
:opts.osc.y = yblock;
 
 
To assign window widths for DWPDS:
 
:options.dwpds.win = [5 3];
 
 
===See Also===
===See Also===
[[alignmat]], [[glsw]], [[oscapp]], [[osccalc]], [[stdgen]], [[stdize]]
 
[[alignmat]], [[calcdifference]], [[glsw]], [[oscapp]], [[osccalc]], [[stdgen]], [[stdize]], [[nlstd]]

Latest revision as of 10:51, 30 August 2017

Purpose

Create or apply calibration and instrument transfer models.

Synopsis

[transfermodel,x1t,x2t] = caltransfer(x1,x2,method,options)
x2t = caltransfer(x2,transfermodel,options)
[transfermodel,x1t,{x2t_1 x2t_2 x2t_3}] = caltransfer(x1,{{x2_1 x2_2 x2_3},method,options)
{x2t_1 x2t_2 x2t_3} = caltransfer({x2_1 x2_2 x2_3},transfermodel,options)

Description

CALTRANSFER uses one of the several transfer functions (methods) available in PLS_Toolbox to return a model and transformed data. The exact I/O is dictated by the transfer function (method) used.

Inputs

x1 = (2-way array class "double" or "dataset") calibration data (e.g., spectra from the standard instrument).
x2 = (2-way array class "double" or "dataset") data to be transformed (e.g., spectra from the instrument to be standardized).
method = (string) indicating which calibration transfer function (method) to use.
Choices are:
ds : Direct Standardization
pds : Piecewise Direct Standardization
dwpds : Double Window Piecewise Direct Standardization
glsw : Generalized Least-Squares Weighting
osc : Orthogonal Signal Correction
alignmat : Matrix Alignment

Outputs

transfermodel = standard model structure containing the Calibration Transfervmodel (See Standard Model Structure).
x1t = Calibration data returned. Depending on the type of calibration function (method) used this may or may not be transformed from the input data (x1).
x2t = Transformed data.

Options

options = structure array with the following fields:

  • display : [ 'off' | {'on'} ] governs level of display to command window.
  • blockdetails : [ 'compact' | {'standard'} | 'all' ] level of detail (predictions, raw residuals, and calibration data) included in the model.
  • ‘Standard’ = does not include x1 & x2 datasets in the model ('model.detail.data').
  • ‘Compact’ = for this function, 'compact' is identical to 'standard'.
  • 'All' = include both x1 & x2 datasets in the model.
  • preprocessing : {[] []} Preprocessing structures for instrument 1 and instrument 2 x-blocks (see PREPROCESS). Note that it is usual in PLS_Toolbox for the preprocessing{2} structure to hold the Y-block preprocessing. But caltransfer does not use a Y-block so instead preprocessing{2} is used to hold the Instrument 2 X-block preprocessing.

NOTE: There are sub-structures for each 'method'. These sub structures include both the input parameters (any additional inputs needed by the function) as well as optional inputs (the options structure for that particular function). For more information on inputs to each method see the help for that function (e.g., help stdgen). Examples of using the substructures:

Example

OSC requires a y-block in addition to (x1) and (x2). The y-block should be assigned via the options structure:

opts.osc.y = yblock;


To assign window widths for DWPDS:

options.dwpds.win = [5 3];


See Also

alignmat, calcdifference, glsw, oscapp, osccalc, stdgen, stdize, nlstd