com.webkitchen.eeg.analysis.filterdesign
Class IIRFilter

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

public class IIRFilter
extends java.lang.Object

Processes digital signal input to filter for specific frequencies. Frequencies, filter type and filtering algorithm are all specified in our FilterSpecification.

See Also:
FilterSpecification

Constructor Summary
IIRFilter(FilterSpecification spec, double[] coef)
          Creates a new IIRFilter that be used to filter raw input.
 
Method Summary
 double process(double val)
          Processes the raw digital signal input to filter for our specific frequencies
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IIRFilter

public IIRFilter(FilterSpecification spec,
                 double[] coef)
Creates a new IIRFilter that be used to filter raw input. For valid results, the coefficients should have been designed by the FilterSpecification, but we don't check validity here, that is the responsibility of the caller. The FilterSpecification, and coefficients are used to filter for our specific frequencies.

Parameters:
spec - the specification that defines our filter's properties
coef - the coefficients that will be used to process input
Method Detail

process

public double process(double val)
Processes the raw digital signal input to filter for our specific frequencies

Parameters:
val - the raw sample value
Returns:
the filtered value