Package Filters

Class FilterParams

java.lang.Object
Filters.FilterParams
All Implemented Interfaces:
Serializable, Cloneable, ManagedParameters

public class FilterParams extends Object implements 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 Details

    • serialVersionUID

      public static final long serialVersionUID
      See Also:
    • filterType

      public FilterType filterType
    • filterBand

      public FilterBand 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 scaleType
      Scale type just used for drawing dialog
    • lastImportFile

      public File 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 type
      band - Filter band
      lowPassFreq - low pass frequency
      highPassFreq - high pass frequency
      order - filter order
  • Method Details

    • equals

      public boolean equals(FilterParams p)
    • assign

      public void assign(FilterParams p)
    • clone

      public FilterParams clone()
    • sayType

      public String sayType()
      Returns:
      the filter type as a string
    • sayBand

      public String sayBand()
      Returns:
      the filter band as a string
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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

      public PamParameterSet getParameterSet()
      Description copied from interface: ManagedParameters
      Get a set of data that describes all of the parameters in a class
      Specified by:
      getParameterSet in interface ManagedParameters
      Returns:
      description of the parameters in a class.