Table of Contents

Class BandPass

Namespace
TimeSeriesAnalysis
Assembly
TimeSeriesAnalysis.dll

Numerical band-pass 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.

LowPass HighPass MovingAvg
public class BandPass
Inheritance
BandPass
Inherited Members

Constructors

BandPass(double, double)

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

Parameters

TimeBase_s double
nanValue double

value to be treated as NaN

Methods

Filter(double, double, double, int, bool)

Adds a single data point to the filter

public double Filter(double signal, double lpFilterTc_s, double hpFilterTc_s, int order = 1, bool doReset = false)

Parameters

signal double

data point

lpFilterTc_s double

low-passfilter time constant in seconds

hpFilterTc_s double

high-passfilter 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

Returns

double

Filter(double[], double, double, int)

Filter an entire time-series in one command

public double[] Filter(double[] signal, double lpFilterTc_s, double hpFilterTc_s, int order = 1)

Parameters

signal double[]

the vector of the entire time-series to be filtered

lpFilterTc_s double

filter time constant

hpFilterTc_s double

filter time constant

order int

filter order, either 1 or 2

Returns

double[]

a vector of the filtered time-series