Package Filters

Class FilterMethod

java.lang.Object
Filters.FilterMethod
Direct Known Subclasses:
FIRFilterMethod, IIRFilterMethod, NullMethod

public abstract class FilterMethod extends Object
Author:
Doug Gillespie

Superclass used by various filter types to calculate poles and zeros, gains, etc.

  • Constructor Details

    • FilterMethod

      public FilterMethod(double sampleRate, FilterParams filterParams)
  • 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

      public abstract Filter createFilter(int channel)
      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

      public FilterParams getFilterParams()
      Returns:
      the filterParams
    • setFilterParams

      public void setFilterParams(FilterParams filterParams)
      Parameters:
      filterParams - the filterParams to set
    • createFilterMethod

      public static FilterMethod createFilterMethod(double sampleRate, FilterParams filterParams)
      Create a filter method based on the type in the parameters.
      Parameters:
      sampleRate - data sample rate
      filterParams - 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: