Package Filters

Class FIRArbitraryFilter


public class FIRArbitraryFilter extends FIRFilterMethod
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
  • Constructor Details

    • FIRArbitraryFilter

      public FIRArbitraryFilter(double sampleRate, FilterParams filterParams)
  • 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 class FIRFilterMethod
      Parameters:
      omega - angular frequency
      Returns:
      phase