[SciPy-User] FIR filter with arbitrary frequency response

Warren Weckesser warren.weckesser@enthought....
Sat Nov 20 22:09:02 CST 2010

On Sat, Nov 20, 2010 at 9:43 PM, Nathaniel Smith <njs@pobox.com> wrote:

> I was wondering if anyone has already written Python code to design
> FIR filters with arbitrary (given) frequency response via
> IDFT+windowing, a la 'fir2' in octave/matlab?
>  http://octave.sourceforge.net/signal/function/fir2.html
>  (Theory: http://www.dspguide.com/ch17/1.htm)
> I don't see it in scipy, but it seems generally useful. (I might end
> up writing it if no-one else has, but I'm not sure yet whether it's
> actually useful for my problem.)

Hi Nathaniel,

There is one implemented as the function firwin2 currently under review in
this ticket:
It will eventually be added to scipy.signal.  Included in the ticket is a
patch file that can be applied to the latest version of the scipy source,
and also a copy of just the updated file fir_filter_design.py.  You could
grab that and try it stand-alone (but you would have to comment out the
local import of sigtools, which is used by the remez function in

Feedback would be appreciated, so if you try it, be sure to write back with
comments or questions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20101120/653dcbc4/attachment.html 

More information about the SciPy-User mailing list