Package Filters
Class FilterMethod
java.lang.Object
Filters.FilterMethod
- Direct Known Subclasses:
FIRFilterMethod
,IIRFilterMethod
,NullMethod
- Author:
- Doug Gillespie
Superclass used by various filter types to calculate poles and zeros, gains, etc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Filter
createFilter
(int channel) static FilterMethod
createFilterMethod
(double sampleRate, FilterParams filterParams) Create a filter method based on the type in the parameters.double[]
Used by new fast IIR filter system.abstract double
getFilterGain
(double omega) Get the filter gain at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).abstract double
abstract double
getFilterPhase
(double omega) Get the filter phase at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).double
void
setFilterParams
(FilterParams filterParams) void
setSampleRate
(double sampleRate)
-
Constructor Details
-
FilterMethod
-
-
Method Details
-
getSampleRate
public double getSampleRate() -
setSampleRate
public void setSampleRate(double sampleRate) -
getFilterGain
public abstract double getFilterGain(double omega) Get the filter gain at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).- Parameters:
omega
- angular frequency- Returns:
- gain
-
getFilterPhase
public abstract double getFilterPhase(double omega) Get the filter phase at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).- Parameters:
omega
- angular frequency- Returns:
- phase
-
getFilterGainConstant
public abstract double getFilterGainConstant()- Returns:
- any additional gain constant (needed for IIRF's)
-
createFilter
- Parameters:
channel
- channel number (used in filter book keeping)- Returns:
- Create a filter object - which can actually do some filtering for us. Note that a filterMethod object may be asked to create multiple filters for multi-channel systems.
-
getFilterParams
- Returns:
- the filterParams
-
setFilterParams
- Parameters:
filterParams
- the filterParams to set
-
createFilterMethod
Create a filter method based on the type in the parameters.- Parameters:
sampleRate
- data sample ratefilterParams
- filter parameters- Returns:
- FilterMethod - an abject which calculates filter coefficients of some sort.
-
getFastFilterCoefficients
public double[] getFastFilterCoefficients()Used by new fast IIR filter system.- Returns:
-