com.webkitchen.eeg.analysis.filterdesign
Class FilterDesigner

java.lang.Object
  extended by com.webkitchen.eeg.analysis.filterdesign.FilterDesigner

public class FilterDesigner
extends java.lang.Object

Creates IIRFilters designed according to the algorithm and type provided in FilterSpecification objects.

To create a new IIRFilter, first create a FilterSpecification object which defines the filter specification. Then pass the FilterSpecification to the FilterDesigner's createFilter method.

This is based on Jim Peters' "Fidlib" digital filter designer code, which is based, in part, on Tony Fisher's "mkfilter" package.

Original source code and information on Jim Peters' Fidlib can be found at:
http://uazu.net/fiview/

Original source code and information on Tony Fisher's mkfilter can be found at:
http://www-users.cs.york.ac.uk/~fisher/mkfilter/

See Also:
FilterSpecification, FilterAlgorithm, FilterRange, IIRFilter

Constructor Summary
FilterDesigner()
           
 
Method Summary
 double[] createCoefficients(FilterSpecification spec)
          Returns an array of filter coefficients.
 IIRFilter createFilter(FilterSpecification spec)
          Returns a new IIRFilter designed according to the specification provided in the FilterSpecification object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilterDesigner

public FilterDesigner()
Method Detail

createFilter

public IIRFilter createFilter(FilterSpecification spec)
Returns a new IIRFilter designed according to the specification provided in the FilterSpecification object

Parameters:
spec - the filter specifications
Returns:
a new IIRFilter
Throws:
FilterDesignException - if any error occurs during the filter design - Errors will likely be due to invalid FilterSpecification settings

createCoefficients

public double[] createCoefficients(FilterSpecification spec)
Returns an array of filter coefficients. This can be used to create IIRFilters in an efficient manner. Create an array of coefficients, then create multiple IIRFilters by passing in copies of the coefficients and the FilterSpecification

Parameters:
spec - the filter specifications
Returns:
an array of coefficients for an IIRFilter
Throws:
FilterDesignException - if any error occurs during the filter design - Errors will likely be due to invalid FilterSpecification settings