Table of Contents

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.

HighPass BandPass MovingAvg
public class LowPass
Inheritance
LowPass
Inherited Members

Constructors

LowPass(double, double)

Constructor

public LowPass(double TimeBase_s, double nanValue = -9999)

Parameters

TimeBase_s double

The time base, the time interval between each time step of the dataset, in seconds

nanValue double

value 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

signal double

data point

FilterTc_s double

filter time constant in seconds

order int

filter order, either 1 or 2 is supported

doReset bool

usually false, setting to true causes filter to reset to the value of signal

stepLength_s double?

if given, the filter ignores any "time base" and uses the stepLength_ provided that can vary for each step

Returns

double

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

signal double[]

the vector of the entire time-series to be filtered

FilterTc_s double

filter time constant

order int

filter order, either 1 or 2

indicesToIgnore List<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