Declaration: TSpdc.FillIn (Mode: TSpdcMode; SpecType: TLayerType; DerivOrder, GroupNr: integer; Caption, ColorMap, VSpdcFormula: string; a1, a2, b1, b2: double; BLMode: TBLMode; BLNeighb: integer): integer;
Fills the parameters of the spectral descriptor. This is equivalent to assigning the individual property values. Please note that in the case of an intensity grid filter you have to define the intensity grid(s) separately by calling AddGridFilter.

The Mode parameter controls the type of the spectral descriptor and may assume one of the following values (see the section on spectral descriptors for an in-depth explanation):

smPeak ... the intensity at a single wavelength or mass
smArea ... the summed intensity within a range of the spectrum
smCorrTempl ... the correlation to a template peak
smCorrInvTempl ... the correlation to an inverse template peak
smPkRatio ... the ratio of two peaks
smCentroid ... the location of the centroid
smArRatio ... the ratio of two areas
smVirtSpdc ... a virtual spectral descriptor
smIntGridFilt ... an intensity grid filter
smGCorrTempl ... the correlation to a generalized Gaussian peak
smGCorrInvTempl ... the correlation to an inverse generalized Gaussian peak
smVarDiff ... the variance of the serial difference of a spectrum
smDeriv1 ... the smoothed first derivative at a particular wavelength
The parameters SpecType and DerivOrder define the spectral type and the order of derivative the descriptor is designed for. The parameter GroupNr specifies the spectral group the descriptor should be applied to.

The parameter Caption is an arbitrary identifier (max. 15 characters), the ColorMap parameter specifies an optional color palette which is assigned to this descriptor. The values a1, a2, b1 and b2 control the parameters of the spectral descriptor. Their specific meaning varies with the type of the descriptor. The BLMode controls the type of the baseline, it may assume one of the following values:

blNone ... no baseline is subtracted
blLinear ... the baseline is a line controlled by the parameters b1 and b2
blP1Level ... the baseline is a constant level controlled by the parameter b1
The parameter BLNeighb specifies the number of neighboring points to the baseline reference point which are averaged to calculate the baseline reference intensity. Setting this parameter higher results in less dependence of the baseline on noise in the spectra; however it may cause systematic deviation if the baseline reference point is set in a narrow valley or peak of the spectrum.

The function returns the following error numbers:

 0 ... everything is OK
-1 ... invalid name: must start with a letter and consist of letters and digits only
-2 ... Mode must not be undefined
-3 ... invalid order of derivative (valid: 0..7)
-4 ... invalid spectral groups (valid: 0..MAXGROUPS)
-5 ... invalid number of baseline reference point neighbors (valid: 0..127)