Class HighPass
A high-pass recursive time-series filter based on LowPass.
This filter is in a recursive(feedback) IIR form that is simple to implement, has few coefficients,
requires litte 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.
Inherited Members
Namespace: TimeSeriesAnalysis
Assembly: TimeSeriesAnalysis.dll
Syntax
public class HighPass
Constructors
| Edit this page View SourceHighPass(double, double)
Constructor
Declaration
public HighPass(double TimeBase_s, double nanValue = -9999)
Parameters
Type | Name | Description |
---|---|---|
double | TimeBase_s | time base/sampling time in seconds of data to be fed filter |
double | nanValue | value of input signal to be ignored/treated as NaN |
Methods
| Edit this page View SourceFilter(double, double, int, bool)
Adds a single data point to the filter
Declaration
public double Filter(double signal, double FilterTc_s, int order = 1, bool doReset = false)
Parameters
Type | Name | Description |
---|---|---|
double | signal | data point |
double | FilterTc_s | filter time constant in seconds |
int | order | filter order, eitehr 1 or 2 is supported |
bool | doReset | usually false, setting to true causes filter to reset to the value of signal |
Returns
Type | Description |
---|---|
double |
Filter(double[], double, int)
Filter an entire time-series in one command
Declaration
public double[] Filter(double[] signal, double FilterTc_s, int order = 1)
Parameters
Type | Name | Description |
---|---|---|
double[] | signal | the vector of the entire time-series to be filtered |
double | FilterTc_s | filter time constant |
int | order | filter order, either 1 or 2 |
Returns
Type | Description |
---|---|
double[] | a vector of the filtered time-series |