Class SecondOrder
- Namespace
- TimeSeriesAnalysis
- Assembly
- TimeSeriesAnalysis.dll
second-order filter
public class SecondOrder
- Inheritance
-
SecondOrder
- Inherited Members
Constructors
SecondOrder(double, double)
Constructor
public SecondOrder(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, double, bool)
Adds a single data point to the filter
public double Filter(double signal, double FilterTc_s, double DampingZeta = 0, bool doReset = false)
Parameters
signaldoubledata point
FilterTc_sdoublefilter time constant in seconds
DampingZetadoublefilter damping factor zeta (0.3-1 results a single overshoot peak, less than 0.3 results in multiple peaks, over 1 results in a damped response with no overshoot)
doResetboolusually false, setting to true causes filter to reset to the value of signal
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