SpectralPreprocessingOptions holds the options applied to all spectra before processed by PLS or PCR.
Constructor | Description |
Full Usage:
SpectralPreprocessingOptions()
|
Default constructor. Set all options to none. |
|
Copy constructor.
|
Instance member | Description |
Full Usage:
this.Clone
Returns: obj
Modifiers: abstract |
|
Full Usage:
this.CopyFrom
Parameters:
SpectralPreprocessingOptions
-
The other instance to copy the data from.
|
Copies all settings from another instance.
|
Full Usage:
this.DetrendingOrder
|
Sets up the order used for detrending. Zero order means that from a given spectrum the mean of all spectral slots is subtracted. One (first order) means that a regression is made over all spectral wavelength (using index as x-value), and that line is then subtracted from the spectrum. |
Full Usage:
this.EnsembleMeanAfterProcessing
Returns: bool
|
Indicates that the ensemble mean should be taken after the spectral preprocessing. This is the normal case. Only in case of MultipleScatteringCorrection the ensemble mean is taken by this method itself, so that it is unneccessary to do it again after the processing.
|
Full Usage:
this.EnsembleScale
|
Sets up if the spectral ensemble should be scaled so that each spectral slot (wavelength) has a variance of 1 over the ensemble of spectra. |
|
|
Full Usage:
this.Method
|
Sets up the main method used for spectral preprocessing. |
Full Usage:
this.Process
Parameters:
IMatrix<float>
-
The matrix of spectra. Each spectrum is a row of the matrix.
xMean : IVector<float>
-
Will be filled with the spectral mean.
xScale : IVector<float>
-
Will be filled with the inverse spectral variance.(Or with 1 if the user has not choosen this option).
|
Processes the spectra in matrix xMatrix according to the set-up options. |
Full Usage:
this.ProcessForPrediction
Parameters:
IMatrix<float>
-
The matrix of spectra. Each spectrum is a row of the matrix.
xMean : IReadOnlyList<float>
-
Vector of spectral mean, must be supplied here.
xScale : IReadOnlyList<float>
-
Vector of inverse spectral variance, must be supplied here.
|
Processes the spectra in matrix xMatrix according to the set-up options for prediction. Since it is prediction, the xMean and xScale vectors must be supplied here!
|
Full Usage:
this.Regions
|
Gets/sets the indices to regions. By default, this array is empty (zero length). Each element of this array is an index into the spectrum. Each index parts the spectrum in two regions: one before up to the index-1, and a second beginning from the index (to the next index or to the end). |
Full Usage:
this.SetRegions
Parameters:
int[]
-
Starting indices of the regions. Must be ascending. You can provide null as an argument.
|
Set the regions by providing an array of indices. These indices are the starting indices of the different regions.
|
Full Usage:
this.SetRegionsByIdentification
Parameters:
IReadOnlyList<float>
-
The vector of x values for the spectra (wavelength, frequencies...).
|
Trys to identify spectral regions by supplying the spectral x values. A end_of_region is recognized when the gap between two x-values is ten times higher than the previous gap, or if the sign of the gap value changes. This method fails if a spectral region contains only a single point (since no gap value can be obtained then). (But in this case almost all spectral correction methods also fails).
|
Full Usage:
this.UseDetrending
|
Indicates if Detrending is applied to each spectrum. |
Static member | Description |
Full Usage:
SpectralPreprocessingOptions.IdentifyRegions(xvalues)
Parameters:
IReadOnlyList<float>
-
The vector of x values for the spectra (wavelength, frequencies...).
Returns: int[]
The array of regions. Each element in the array is the starting index of a new region into the vector xvalues.
|
Trys to identify spectral regions by supplying the spectral x values. A end_of_region is recognized when the gap between two x-values is ten times higher than the previous gap, or if the sign of the gap value changes. This method fails if a spectral region contains only a single point (since no gap value can be obtained then). (But in this case almost all spectral correction methods also fails).
|