SciPy compatible design tools around Elliptic filters with minimal Q-factors (EMQF). EMQF filters are a subset of Elliptic IIR filters. They can be used for different purposes:
- Crossover filter pairs which can be used in real-time audio filterbanks
- Magnitude-complementary pairs aka Generalized Linkwitz–Riley crossovers (also here)
- Power-complementary pairs
- Quadrature mirror filter (QMF) for Wavelet style filterbanks
- Efficient IIR Hilbert Transformer
Install package:
pip install "filterdesign @ git+https://github.com/raphaelw/filter-design.git"
Design and plot filter:
import matplotlib.pyplot as plt
from filterdesign import emqf
from filterdesign import filterplot
z, p, k = emqf.emqfap(N=7, stopband_attenuation=50, f3db=True)
fig, (ax1, ax2) = plt.subplots(1, 2)
filterplot.plot_analog_filter_zpk((z, p, k), ax=ax1)
filterplot.pole_zero_plot((z, p, k), unitcircle=True, ax=ax2)
plt.show()
Install this library in editable mode:
pip install -e .
Or install with all optional dependencies
pip install -e .[examples,dev,build]
Run tests
python -m unittest discover --start-directory tests --pattern "test_*.py" --verbose
Use Black Code Formatter.