DIGITAL_FILTER
The
DIGITAL_FILTER
function returns the coefficients of a non-recursive, digital filter for evenly spaced data points. Frequencies are expressed in terms of the Nyquist frequency, 1/2T, where T is the time between data samples. Highpass, lowpass, bandpass and bandstop
filters may be constructed with this function. The resulting vector of coefficients has (2
¥
Nterms
+ 1) elements.
This routine is written in the IDL language. Its source code can be found in the file
digital_filter.pro
in the
lib
subdirectory of the IDL distribution.
Calling Sequence
Result = DIGITAL_FILTER(
Flow, Fhigh, A, Nterms
)
Arguments
Flow
The lower frequency of the filter as a fraction of the Nyquist frequency
Fhigh
The upper frequency of the filter as a fraction of the Nyquist frequency. The following conditions are necessary for various types of filters:
-
No Filtering:
Flow
= 0,
Fhigh
= 1
-
Low Pass:
Flow
= 0, 0 <
Fhigh
< 1
-
High Pass: 0 <
Flow
< 1,
Fhigh
=1
-
Band Pass: 0 <
Flow
<
Fhigh
< 1
-
Band Stop: 0 <
Fhigh
<
Flow
< 1
A
The size of Gibbs phenomenon wiggles in -db. 50 is a good choice.
Nterms
The number of terms in the filter formula. The order of filter.
Example
Coeff = DIGITAL_FILTER(Flow, Fhigh, A, Nterms)
Followed by:
Yout = CONVOL(Yin, Coeff)