![]() |
![]() |
|
PLS_Toolbox Documentation: baselinew | < baseline | browse > |
baselinew
Purpose
Baseline using windowed polynomial filter.
Synopsis
[y_b,b_b]= baselinew(y,x,width,order,res,options)
Description
BASELINEW recursivley calls LSQ2TOP to fit polynomials to the bottom (or top) of a curve e.g. a spectrum. It uses a windowed approach and can be considered a filter or baseline (low frequency) removal algorithm. The window depends on the frequency of the low frequency component (baseline) and wide windows and low order polynomials are often used. See LSQ2TOP.
The curve(s) to be fit (dependent variable) y, the axis to fit against (the independent variable) x [e.g. y = P(x)], the window width width (an odd integer), the polynomial order order, and an approximate noise level in the curve res. Note that y can be MxN where x is 1xN. The optional input options is discussed below.
Output y_b is a MxN matrix of ROW vectors that have had the baselines removed, and output b_b is a matrix of baselines. Therefore, y_b is the high frequency component and b_b is the low frequency component.
Examples
If y is a 5 by 100 matrix then
y_b = baselinew(y,[],25,3,0.01);
gives a 5 by 100 matrix y_b of row vectors that have had the baseline removed using a 25-point cubic polynomial fit of each row of y.
If y is a 2 by 100 matrix then
y_b = baselinew(y,x,51,3,0.01);
gives a 2 by 100 matrix y_b of row vectors that have had the baseline removed using a 51-point second order polynomial fit of each row of y to x.
Options
See Also
baseline, lamsel, lsq2top, mscorr, savgol, stdfir, wlsbaseline
< baseline | browse > |