Standard Library function that constructs finite impulse response digitalfilters for signal processing.
fhigh
gibbs
nterm
Desired Effect | Value |
---|---|
No filtering | flow = 0, fhigh = 1 |
Lowpass filter |
flow = 0, 0 ![]() ![]() |
Highpass filter |
0 ![]() ![]() |
Bandpass filter |
0 ![]() ![]() ![]() |
Bandstop filter |
0 ![]() ![]() ![]() |
The Gibbs Phenomenon variations are oscillations which result from the abrupt truncation of the infinite FFT series. Setting the gibbs parameter either too high or too low may yield unacceptable results.
TIP: A value of 50 for gibbs is a good choice for most filters.
To evaluate the coefficients of a digital filter and then apply them to a signal, use the following sequence of equations:
Filtered_Signal = CONVOL(input_signal, coeff)
NOTE: Two or more filters created by DIGITAL_FILTER can be combined by addition, subtraction, or averaging to create multiple filtering effects with one filter.
av_temp = FLTARR(140) OPENR, unit, !Data_dir + 'example_air_q.dat', /Get_lun READF, unit, av_temp, Format='(5X,F9.4)'
FREE_LUN, unit PLOT, av_temp
filter = DIGITAL_FILTER(0.0, 0.1, 50, 10)
filt_temp = CONVOL(av_temp, filter)
OPLOT, filt_temp, Linestyle=2
mandril = BYTARR(512,512) OPENR, unit, !Data_dir + 'mandril.img', /Get_lun READU, unit, mandril
FREE_LUN, unit WINDOW, XSize=512, YSize=512 TV, mandril
mandril = FLOAT(mandril)
filter = DIGITAL_FILTER(0.0, 0.1, 50, 10)
filt_image = CONVOL(mandril, filter)
TV, filt_image