Class LowPass
- Namespace
- TimeSeriesAnalysis
- Assembly
- TimeSeriesAnalysis.dll
Low-pass filtering of time-series.
This filter is in a recursive(feedback) IIR form that is simple to implement, has few coefficients,
requires little memory and computation. This filter is causal, meaning that
for calculating the filtered value at time k it does not use future values such as k+1, but
this is at the expense of introducing a time-shift/phase-shift.
public class LowPass
- Inheritance
-
LowPass
- Inherited Members
Constructors
LowPass(double, double)
Constructor
public LowPass(double TimeBase_s, double nanValue = -9999)
Parameters
TimeBase_sdoubleThe time base, the time interval between each time step of the dataset, in seconds
nanValuedoublevalue that is to be treated as NaN and ignored
Methods
Filter(double, double, int, bool, double?)
Adds a single data point to the filter
public double Filter(double signal, double FilterTc_s, int order = 1, bool doReset = false, double? stepLength_s = null)
Parameters
signaldoubledata point
FilterTc_sdoublefilter time constant in seconds
orderintfilter order, either 1 or 2 is supported
doResetboolusually false, setting to true causes filter to reset to the value of signal
stepLength_sdouble?if given, the filter ignores any "time base" and uses the stepLength_ provided that can vary for each step
Returns
Filter(double[], double, int, List<int>)
Filter an entire time-series in one command
public double[] Filter(double[] signal, double FilterTc_s, int order = 1, List<int> indicesToIgnore = null)
Parameters
signaldouble[]the vector of the entire time-series to be filtered
FilterTc_sdoublefilter time constant
orderintfilter order, either 1 or 2
indicesToIgnoreList<int>for these indices the of the signal, the filter should just "freeze" the value(can be null)
Returns
- double[]
a vector of the filtered time-series