![]() |
![]() |
|
PLS_Toolbox Documentation: wlsbaseline | < vline | wrtpulse > |
wlsbaseline
Purpose
Weighted least squares baseline function.
Synopsis
[bldata,wts] = wlsbaseline(data,baseline,options)
[bldata,wts] = wlsbaseline(data,order,options)
Description
Subtracts a baseline (or other signal) from a spectrum with the constraint that residuals below zero be weighted more heavily than those above zero. This achieves a robust "non-negaitve" residual fit when residuals of significant amplitude (e.g. signals on a background) are present.
Inputs are data the spectral data, baseline the reference spectrum/spectra to use for baseline OR an integer value representing the order of polynomial baselining to use and options an optional options structure.
Outputs are the baselined data bldata and the weightings wts indicating the amount of baseline which was removed from each spectrum in data. (i.e. bldata = data - wts*baseline)
Polynomial baseline Option: If a positive scalar value is given instead of the input baseline, then a polynomial baseline of that order will be used. In this mode, any row of the output wts can be used with the polyval function to obtain the baseline removed from the corresponding row of data.
Options
Examples
To swap 4 BYTES in a 32 bit number:
See Also
baseline, baselinew, mscorr, savgol
< vline | wrtpulse > |