- Data.SG_Filter(col=None, xcol=None, points=15, poly=1, order=0, pad=True, result=None, replace=False, header=None)¶
Implement a Savitsky-Golay filtering of data for smoothing and differentiating data.
col (column index) – Column of Data to be filtered. if None, first y-column in setas is filtered.
points (int) – Number of data points to use in the filtering window. Should be an odd number > poly+1 (default 15)
- Keyword Arguments
xcol (coilumn index) – If order>1 then can be used to specify an x-column to differentiate with respect to.
poly (int) – Order of polynomial to fit to the data. Must be equal or greater than order (default 1)
order (int) – Order of differentiation to carry out. Default=0 meaning smooth the data only.
(numpy array or self) – If result is None, a numpy array representing the smoothed or differentiated data is returned. Otherwise, a copy of the modified AnalysisMixin object is returned.
If col is not specified or is None then the
DataFile.setascolumn assignments are used to set an x and y column. If col is a tuple, then it is assumed to secify and x-column and y-column for differentiating data. This is now a pass through to
Padding can help stop wildly wrong artefacts in the data at the start and enf of the data, particularly when the differntial order is >1.
User guide section Smoothing and Filtering Data