[SciPy-User] FIR filter with arbitrary frequency response
Sat Nov 20 22:09:02 CST 2010
On Sat, Nov 20, 2010 at 9:43 PM, Nathaniel Smith <firstname.lastname@example.org> 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?
> (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.)
There is one implemented as the function firwin2 currently under review in
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...
More information about the SciPy-User