Smoothes the data in the variable Spectrum. The parameter Mode specifies the type of smoothing:
spsmMovAvg ... moving average
spsmWgtAvg ... weighted moving average
spsmPolynomial ... SavitzkyGolay polynomial smoothing
spsmMovMed ... moving median
spsmPenSpline ... penalized spline
spsmSincBS ... sinc bandstop (convolved with a Blackman window)
spsmSincBP ... sinc bandpass (convolved with a Blackman window)
spsmSincLP ... sinc lowpass (convolved with a Blackman window)
spsmSincHP ... sinc highpass (convolved with a Blackman window)
spsmChebychevLP ... Chebychev lowpass filter
The parameter WindowSize defines the size of the smoothing window in the case of the moving window algorithms (spsmMovAvg, spsmWgtAvg, spsmPolynomial, spsmMovMed) and must be an odd value. In the case of the penalized spline the WindowSize is irrelevant and ignored. For Chebychev filters it controls the number of poles and must be even (2..20).
The parameters SmoothPar1 and SmoothPar2 have different meanings for the various filter modes:
Mode 
SmoothPar1 
SmoothPar2 
spsmMovAvg,
spsmWgtAvg,
spsmPolynomial,
spsmMovMed 
ignored 
ignored 
spsmPenSpline 
controls the stiffness of the spine valid range: 0.0 (no penalizing) to 1.0 (full penalizing) 

spsmSincBS,
spsmSincBP 
cutoff frequency of the lower limit of the band as a fraction of the sampling frequency valid range: >0.0 to 0.5. 
cutoff frequency of the upper limit of the band as a fraction of the sampling frequency valid range: >0.0 to 0.5. 
spsmSincLP,
spsmSincHP 
cutoff frequency as a fraction of the sampling frequency valid range: >0.0 to 0.5. 
ignored 
spsmChebychevLP 
cutoff frequency as a fraction of the sampling frequency valid range: >0.0 to 0.5. 
controls the percent ripple in the passband valid range: 0 to 29 
The function returns the following error codes:
0 ... everything is OK
3 ... invalid Mode
4 ... WindowSize out of range
5 ... SmoothPar1 and/or SmoothPar2 out of range
6 ... WindowSize must be odd
7 ... WindowSize must be less than half of the spectral range
8 ... WindowSize must be even (Chebychev)
9 ... SmoothPar2 out of range (Chebychev: 0..29)
