Declaration: TSpdc.AddGridFilter (Intens: TIntArray; RangeLow, RangeHigh, BaseLP1, BaseLP2: double; Group, NNeighb: integer): integer;
The function AddGridFilter adds an intensity grid filter to the spectral descriptor. The parameter Intens specifies the intensity grid. The parameters RangeLow, RangeHigh, BaseLP1 and BaseLP2 define the wavelength range of the descriptor and the wavelengths of the baseline reference points. The Group parameter specifies the spectral group the descriptor should be applied to and the parameter NNeighb controls the number of data points used for averaging the intensities around the baseline reference points.

The function returns the following error codes:

>0 ... everything is OK, the returned number is the index of added grid filter
-1 ... Intens must contain at least three points
-2 ... RangeLow, RangeHigh, BaseLP1, or BaseLP2 is negative
-3 ... Group out of range
-4 ... invalid NNeighb
-5 ... spectral descriptor is not of smIntGridFilt type