[SciPy-user] FIR filter, calculated with Remez exchange algorithm ?
Thu Apr 19 23:15:39 CDT 2007
Stef Mientki wrote:
> ok, I got the answer (I think)
> A slightly changed design, works perfect:
> filt_4 = signal.remez (25, (0, 0.01, 0.2, 0.5), (0.01, 1))
> The filterlength must be odd, because it's a high pass filter.
> If the length is even, the respons at Nyquist is zero,
> so my orginal example
> filt_4 = signal.remez (24, (0, 0.01, 0.2, 0.49), (0.01, 1))
> will try to create a transition band between 0.49 and 0.5,
> which is much to steep for this filterlength.
> I never encountered this problem because MatLab,
> and previous programs I used always corrected this themselfs.
> Now would it be possible to implement this behaviour in the library
> (I think it's usefull for beginners and previous MatLab users)
> if last amplitude band = 1 (because it also must be odd for bandstop filters)
> make N odd
> make N even
I guess the question is should we raise an error or just auto-correct.
I'm thinking raising an error may help avoid this mis-learning. But,
then again, if we document that it rounds up to the nearest odd-length
under such conditions that may suffice.
More information about the SciPy-user