Filtering Module

Functions and values

Function or value Description

optimizeWindowWidth polOrder windowWidthToTest blankSignal signalOfInterest

Full Usage: optimizeWindowWidth polOrder windowWidthToTest blankSignal signalOfInterest

Parameters:
    polOrder : int -
    windowWidthToTest : int[] -
    blankSignal : float[] -
    signalOfInterest : float[] -

Returns: int

Estimates the autocorrelation at lag 1 of a blank signal (containing only noise). Subsequently, the signal of interest is smoothed
several times by a savitzky golay filter using constant polynomial order and variing windowWidth. For each iteration, the deviation
of the smoothed to the original signal is computed and the autocorrelation at lag 1 of this residual noise is computed. The function returns the optimized
window width yielding a autocorrelation at lag 1 closest to the value computed for the blank signal.

Method is based on: https://doi.org/10.1021/ac0600196

polOrder : int

windowWidthToTest : int[]

blankSignal : float[]

signalOfInterest : float[]

Returns: int

Example

savitzkyGolay windowSize order deriv rate data

Full Usage: savitzkyGolay windowSize order deriv rate data

Parameters:
    windowSize : int
    order : int
    deriv : int
    rate : int
    data : float[]

Returns: float[]

Smooth (and optionally differentiate) data with a Savitzky-Golay filter.
The Savitzky-Golay filter is a type of low-pass filter and removes high frequency noise from data.

windowSize : int
order : int
deriv : int
rate : int
data : float[]
Returns: float[]