Package Filters
Class FIRArbitraryFilter
java.lang.Object
Filters.FilterMethod
Filters.FIRFilterMethod
Filters.FIRArbitraryFilter
Arbitrary response filters.
this really doens't fit well into the filterMethod framework since
it no longer used a filterParams method, but will
try to use as best I can so that these more arbitrary filters
can be used within the same framework as other types of filter.
- Author:
- Doug Gillespie
-
Field Summary
Fields inherited from class Filters.FIRFilterMethod
NRESPONSEPOINTS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
double
getFilterPhase
(double omega) Get the filter phase at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).void
setResponse
(double[] frequency, double[] gain, int logFilterOrder, double windowGamma) Set the filter response.Methods inherited from class Filters.FIRFilterMethod
createFilter, getFilterGain, getFilterGainConstant, getFilterTaps
Methods inherited from class Filters.FilterMethod
createFilterMethod, getFastFilterCoefficients, getFilterParams, getSampleRate, setFilterParams, setSampleRate
-
Constructor Details
-
FIRArbitraryFilter
-
-
Method Details
-
setResponse
public void setResponse(double[] frequency, double[] gain, int logFilterOrder, double windowGamma) Set the filter response. The first and last frequency points should correspond to the 0 and the niquist frequency- Parameters:
frequency
- array of frequency values.gain
- array of gain values.filterOrder
- must be an exact power of 2
-
calculateFilter
public int calculateFilter() -
getFilterPhase
public double getFilterPhase(double omega) Description copied from class:FilterMethod
Get the filter phase at an angular frequency (o invalid input: '<' omega invalid input: '<' pi).- Overrides:
getFilterPhase
in classFIRFilterMethod
- Parameters:
omega
- angular frequency- Returns:
- phase
-