IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
pre_bc_poly.m
Go to the documentation of this file.
1 %> @brief Polynomial Baseline Correction
2 %>
3 %> Algorithm is implemented in data-independent bc_poly.m
4 %>
5 %> @sa bc_poly.m, uip_pre_bc_poly.m
6 classdef pre_bc_poly < pre_bc
7  properties
8  %> =5. See bc_poly.m
9  order = 5;
10  %> =[] (auto). See bc_poly.m
11  epsilon = [];
12  contaminant_data = [];
13  contaminant_idxs = [];
14  end;
15 
16 
17  methods
18  function o = pre_bc_poly(o)
19  o.classtitle = 'Polynomial';
20  end;
21  end;
22 
23  methods(Access=protected)
24 
25  %> Applies block to dataset
26  function data = do_use(o, data)
27  if ~isempty(o.contaminant_data)
28  X = o.contaminang_data.X(o.idxs, :);
29  else
30  X = [];
31  end;
32 
33  data.X = bc_poly(data.X, o.order, o.epsilon, X);
34  end;
35  end;
36 
37 end
Base Block class.
Definition: block.m:2
Baseline Correction base class.
Definition: pre_bc.m:2
function bc_poly(in X, in order, in epsilon, in Xcont)
Property classtitle
Class Title. Should have a descriptive name, as short as possible.
Definition: irobj.m:50
Polynomial Baseline Correction.
Definition: pre_bc_poly.m:6