public class ExpFilter
extends java.lang.Object
Discrete filter based upon the FourierExpTransform
class.
When the filters are described as "perfect", we are implying that they do not roll off with frequency (thus, they are of infinite order). The transfer function of the filter has values of either unity or zero. This may or may not correspond to a linear phase filter.
gov.sns.tools.dsp.FourierExpTransform
Constructor and Description |
---|
ExpFilter(int szData)
Create a new filter object for processing discrete functions (i.e.,
objects of type
double[] ) with the given size. |
Modifier and Type | Method and Description |
---|---|
int |
getDataSize()
Return the expected size of the discrete function to be
processed.
|
int |
getMaximumFrequency()
Return the maximum discrete frequency processed by this filter.
|
double[] |
parabolicLowPass(int intFreq,
double[] arrFunc)
Parabolic low-pass filter.
|
double[] |
perfectBandPass(int intFreqLow,
int intFreqHigh,
double[] arrFunc)
Perfect band-pass filter.
|
double[] |
perfectHighPass(int intFreq,
double[] arrFunc)
Perfect high-pass filter.
|
double[] |
perfectLowPass(int intFreq,
double[] arrFunc)
Perfect low-pass filter.
|
double[] |
perfectNotch(int intFreq,
double[] arrFunc)
Perfect notch filter.
|
double[] |
perfectNotch(int intFreqLow,
int intFreqHigh,
double[] arrFunc)
Perfect notch filter.
|
public ExpFilter(int szData)
double[]
) with the given size.szData
- size of the functions this filter can processpublic int getDataSize()
public int getMaximumFrequency()
public double[] perfectLowPass(int intFreq, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreq
- discrete cut off frequencyarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than max frequencyjava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensionspublic double[] perfectHighPass(int intFreq, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreq
- discrete cut off frequencyarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than max frequencyjava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensionspublic double[] perfectBandPass(int intFreqLow, int intFreqHigh, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreqLow
- discrete low-band cut off frequencyintFreqHigh
- discrete high-band cut off frequencyarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than data sizejava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensionspublic double[] perfectNotch(int intFreqLow, int intFreqHigh, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreqLow
- discrete low-band cut off frequencyintFreqHigh
- discrete high-band cut off frequencyarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than data sizejava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensionspublic double[] perfectNotch(int intFreq, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreq
- discrete frequency to be removedarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than data sizejava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensionspublic double[] parabolicLowPass(int intFreq, double[] arrFunc) throws java.lang.IndexOutOfBoundsException, java.lang.IllegalArgumentException
intFreq
- discrete cut off frequencyarrFunc
- discrete function to be filteredjava.lang.IndexOutOfBoundsException
- cut off frequency either negative or greater than max frequencyjava.lang.IllegalArgumentException
- discrete function size is not equal to filter dimensions