[SciPy-User] scipy.signal.remez producing odd filter effects / not producing desired effect
Clancy Rowley
clancyr at gmail.com
Mon Jul 11 12:08:06 EDT 2016
Just a suggestion: for low-pass and band-pass filters, you might have better luck with Butterworth filters:
from scipy.signal import butter, freqz
fs = 44100
nyquist = 0.5/fs
passband = np.array([2000.,4500.]) * nyquist
order = 4
num, den = butter(order, passband, btype='bandpass')
w, h = freqz(num, den)
-clancy
> On Jul 11, 2016, at 10:23 AM, Matti Viljamaa <mviljamaa at kapsi.fi> wrote:
>
> What about the following:
>
> is this (the almost -15dB cut in the transition from <2000Hz to >2000Hz) a “feature" of the filter?
>
> <Screen Shot 2016-07-11 at 17.22.02.png>
>
> plotted with:
>
> bands = np.array([0, cutoff - 0.5*transition_width,
> cutoff + 0.5*transition_width, cutoff + 0.5*transition_width + 2400.0, cutoff + 0.5*transition_width + 2500.0,fs/2.0]) / fs
> desired = [0.5, 1, 0.3]
>
> -Matti
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> https://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list