Stdgen: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Benjamin
No edit summary
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
===Purpose===
===Purpose===
Piecewise and direct standardization transform generator.
Piecewise and direct standardization transform generator.
===Synopsis===
===Synopsis===
:[stdmat,stdvect] = stdgen(spec1,spec2,''win,options'')
:[stdmat,stdvect] = stdgen(spec1,spec2,''win,options'')
:options = stdgen('options')
 
===Description===
===Description===
STDGEN can be used to generate direct or piecewise direct standardization matrix with or without additive background correction. It can also be used to generate the transform using the "double window" method. The transform is based on spectra from two instruments, or original calibration spectra and drifted spectra from a single instrument.
STDGEN can be used to generate direct or piecewise direct standardization matrix with or without additive background correction. It can also be used to generate the transform using the "double window" method. The transform is based on spectra from two instruments, or original calibration spectra and drifted spectra from a single instrument.
INPUTS:
 
* spec1 = ''M'' by ''N1'' spectra from the standard instrument, and
====Inputs====
* spec2 = ''M'' by ''N2'' spectra from the instrument to be standarized.
 
OPTIONAL INPUTS:
* '''spec1''' = ''M'' by ''N1'' spectra from the standard instrument, and
* ''win'' = [], empty or a 1 or 2 element vector.
* '''spec2''' = ''M'' by ''N2'' spectra from the instrument to be standarized.
If win is a scalar then STDGEN uses a single window algorithm,
 
*  and if win is a 2 element vector it uses a double window algorithm.
====Optional Inputs====
win(1) = (odd) is the number of channels to be used for each transform, and
 
win(2) = (odd) is the number of channels to base the transform on.
* '''''win''''' = [], empty or a 1 or 2 element vector.
* If win is not input it is set to zero and direct standardization is used.
:: If win is a scalar then STDGEN uses a single window algorithm,
* ''options'' =  a structure array discussed below.
:: If win is a 2 element vector it uses a double window algorithm.
OUTPUTS:
 
* stdmat = the transform matrix, and
:: '''win(1)''' = (odd) is the number of channels to be used for each transform, and
* stdvect = the additive background correction.
:: '''win(2)''' = (odd) is the number of channels to base the transform on.
 
:: '''If''' win is not input, it is set to zero and direct standardization is used.
 
''options'' =  a structure array discussed below.
 
====Outputs====
 
* '''stdmat''' = the transform matrix, and
* '''stdvect''' = the additive background correction.
 
Note: if only one output argument is given, no background correction is used.  
Note: if only one output argument is given, no background correction is used.  
===Options===
===Options===
* ''options'' =  a structure array with the following fields:
 
* tol: [ {0.01} ], tolerance used in forming local models (it equals the minimum relative size of singular values to include in each model), and
''options'' =  a structure array with the following fields:
* maxpc: [ ], specifies the maximum number of PCs to be retained for each local model {default: []}. maxpc must be ? the number of transfer samples. If maxpc is not empty it supersedes tol.
* '''tol''': [ {0.01} ], tolerance used in forming local models (it equals the minimum relative size of singular values to include in each model), and
The default options can be retreived using: options = stdgen('options');.
* '''maxpc''': [ ], specifies the maximum number of PCs to be retained for each local model {default: []}. maxpc must be ? the number of transfer samples. If maxpc is not empty it supersedes tol.
* '''waitbar''': ['off' | {'on'}], governs display of waitbar.
 
===See Also===
===See Also===
[[baseline]], [[distslct]], [[mscorr]], [[stdfir]], [[stdize]], [[stdsslct]]
 
[[alignpeaks]], [[alignspectra]], [[baseline]], [[caltransfer]], [[deresolv]], [[distslct]], [[mscorr]], [[reducennsamples]], [[registerspec]], [[stdfir]], [[stdize]], [[stdsslct]], [[nlstd]]

Latest revision as of 16:53, 15 August 2017

Purpose

Piecewise and direct standardization transform generator.

Synopsis

[stdmat,stdvect] = stdgen(spec1,spec2,win,options)

Description

STDGEN can be used to generate direct or piecewise direct standardization matrix with or without additive background correction. It can also be used to generate the transform using the "double window" method. The transform is based on spectra from two instruments, or original calibration spectra and drifted spectra from a single instrument.

Inputs

  • spec1 = M by N1 spectra from the standard instrument, and
  • spec2 = M by N2 spectra from the instrument to be standarized.

Optional Inputs

  • win = [], empty or a 1 or 2 element vector.
If win is a scalar then STDGEN uses a single window algorithm,
If win is a 2 element vector it uses a double window algorithm.
win(1) = (odd) is the number of channels to be used for each transform, and
win(2) = (odd) is the number of channels to base the transform on.
If win is not input, it is set to zero and direct standardization is used.

options = a structure array discussed below.

Outputs

  • stdmat = the transform matrix, and
  • stdvect = the additive background correction.

Note: if only one output argument is given, no background correction is used.

Options

options = a structure array with the following fields:

  • tol: [ {0.01} ], tolerance used in forming local models (it equals the minimum relative size of singular values to include in each model), and
  • maxpc: [ ], specifies the maximum number of PCs to be retained for each local model {default: []}. maxpc must be ? the number of transfer samples. If maxpc is not empty it supersedes tol.
  • waitbar: ['off' | {'on'}], governs display of waitbar.

See Also

alignpeaks, alignspectra, baseline, caltransfer, deresolv, distslct, mscorr, reducennsamples, registerspec, stdfir, stdize, stdsslct, nlstd