SpectralPreprocessingOptions Type

SpectralPreprocessingOptions holds the options applied to all spectra before processed by PLS or PCR.

Constructors

Constructor Description

SpectralPreprocessingOptions()

Full Usage: SpectralPreprocessingOptions()

Default constructor. Set all options to none.

SpectralPreprocessingOptions(from)

Full Usage: SpectralPreprocessingOptions(from)

Parameters:

Copy constructor.

from : SpectralPreprocessingOptions

Instance members

Instance member Description

this.Clone

Full Usage: this.Clone

Returns: obj
Modifiers: abstract

Returns: obj

this.CopyFrom

Full Usage: this.CopyFrom

Parameters:

Copies all settings from another instance.

from : SpectralPreprocessingOptions

The other instance to copy the data from.

this.DetrendingOrder

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.

this.EnsembleMeanAfterProcessing

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.

Returns: bool

this.EnsembleScale

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.

this.Export

Full Usage: this.Export

Parameters:

writer : XmlWriter

this.Method

Full Usage: this.Method

Sets up the main method used for spectral preprocessing.

this.Process

Full Usage: this.Process

Parameters:
    xMatrix : 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.

xMatrix : 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).

this.ProcessForPrediction

Full Usage: this.ProcessForPrediction

Parameters:
    xMatrix : 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!

xMatrix : 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.

this.Regions

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).

this.SetRegions

Full Usage: this.SetRegions

Parameters:
    regions : 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.

regions : int[]

Starting indices of the regions. Must be ascending. You can provide null as an argument.

this.SetRegionsByIdentification

Full Usage: this.SetRegionsByIdentification

Parameters:
    xvalues : 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).

xvalues : IReadOnlyList<float>

The vector of x values for the spectra (wavelength, frequencies...).

this.UseDetrending

Full Usage: this.UseDetrending

Indicates if Detrending is applied to each spectrum.

Static members

Static member Description

SpectralPreprocessingOptions.IdentifyRegions(xvalues)

Full Usage: SpectralPreprocessingOptions.IdentifyRegions(xvalues)

Parameters:
    xvalues : 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).

xvalues : 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.