Package Filters
Class FilterParams
java.lang.Object
Filters.FilterParams
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
- Author:
- Doug Gillespie
Parameters for digital filter design - just the filter on it's own, not the complete set with data sources and everything eles.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptiondouble[]
double[]
double
int
float
Some extras for arbitrary filters.float
double
static final int
static final int
int
Scale type just used for drawing dialogstatic final long
double
-
Constructor Summary
ConstructorDescriptionConstruct a filter parameter set with default paramsFilterParams
(FilterType type, FilterBand band, float lowPassFreq, float highPassFreq, int order) Construct a filter params set with given params -
Method Summary
Modifier and TypeMethodDescriptionvoid
clone()
boolean
double[]
double[]
getArbFreqsReNiquist
(double sampleRate) double[]
double[]
double
double
This method only included so that centreFreq gets automatically added to PamParameterSet in getParameterSet methoddouble[]
getFrequencyLimits
(double sampleRate) Get a set of data that describes all of the parameters in a classsayBand()
sayType()
void
setArbFilterShape
(double[] f, double[] gain) void
setCentreFreq
(double d) toString()
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
filterType
-
filterBand
-
filterOrder
public int filterOrder -
lowPassFreq
public float lowPassFreq -
highPassFreq
public float highPassFreq -
passBandRipple
public double passBandRipple -
stopBandRipple
public double stopBandRipple -
chebyGamma
public double chebyGamma -
scaleType
public int scaleTypeScale type just used for drawing dialog -
lastImportFile
Some extras for arbitrary filters. -
arbFreqs
public double[] arbFreqs -
arbGains
public double[] arbGains -
SCALE_LOG
public static final int SCALE_LOG- See Also:
-
SCALE_LIN
public static final int SCALE_LIN- See Also:
-
-
Constructor Details
-
FilterParams
public FilterParams()Construct a filter parameter set with default params -
FilterParams
public FilterParams(FilterType type, FilterBand band, float lowPassFreq, float highPassFreq, int order) Construct a filter params set with given params- Parameters:
type
- Filter typeband
- Filter bandlowPassFreq
- low pass frequencyhighPassFreq
- high pass frequencyorder
- filter order
-
-
Method Details
-
equals
-
assign
-
clone
-
sayType
- Returns:
- the filter type as a string
-
sayBand
- Returns:
- the filter band as a string
-
toString
-
getCenterFreq
public double getCenterFreq() -
getCentreFreq
public double getCentreFreq()This method only included so that centreFreq gets automatically added to PamParameterSet in getParameterSet method- Returns:
-
setCentreFreq
public void setCentreFreq(double d) -
setArbFilterShape
public void setArbFilterShape(double[] f, double[] gain) -
getArbFreqsReNiquist
public double[] getArbFreqsReNiquist(double sampleRate) - Parameters:
sampleRate
- sample rate (NOT Niquist)- Returns:
- the arbFreqs normalised to Niquist.
-
getArbFreqs
public double[] getArbFreqs() -
getArbGainsdB
public double[] getArbGainsdB()- Returns:
- the arbGains
-
getFrequencyLimits
public double[] getFrequencyLimits(double sampleRate) - Returns:
- the nominal pass band of the filter.
-
getArbGainsFact
public double[] getArbGainsFact()- Returns:
- the arbGains
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-