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
FieldsModifier and TypeFieldDescriptiondouble[]double[]doubleintfloatSome extras for arbitrary filters.floatdoublestatic final intstatic final intstatic intstatic final intstatic final intintScale type just used for drawing dialogstatic final longdouble -
Constructor Summary
ConstructorsConstructorDescriptionConstruct 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 TypeMethodDescriptionvoidclone()booleandouble[]double[]getArbFreqsReNiquist(double sampleRate) double[]double[]doubledoubleThis 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()voidsetArbFilterShape(double[] f, double[] gain) voidsetCentreFreq(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:
-
PZPLOT_PZ
public static final int PZPLOT_PZ- See Also:
-
PZPLOT_IMPULSE
public static final int PZPLOT_IMPULSE- See Also:
-
pzPlotStyle
public static int pzPlotStyle
-
-
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:ManagedParametersGet a set of data that describes all of the parameters in a class- Specified by:
getParameterSetin interfaceManagedParameters- Returns:
- description of the parameters in a class.
-