[SciPy-user] Lowpass Filter

Sturla Molden sturla@molden...
Thu Feb 5 11:49:02 CST 2009

On 2/5/2009 6:17 PM, Marco wrote:

> How do I apply a low pass filter (with selected frequency and width)
> to this signal?

What kind of lowpass filter?

Single-pole? Butterworth? Bessel? Gaussian? Cheychev? Elliptic? 
Truncated sinc with window? What kind of window?

But basically:

- First obtain your filter coefficients. Filter design is an extensive 
subject; I cannot cover it here. Consult a text book.

- Short FIR or IIR: apply filter to signal with scipy.signal.lfilter.

- Long FIR: use numpy.fft.rfft for convolution in the Fourier plane.

(You will get faster results with FFTW instead of NumPy's FFT.)


More information about the SciPy-user mailing list