Monday, 9 November 2026

PyFDA

Christian Münker's pyfda: Python Filter Design Analysis Tool does exactly what it says on the tin - it is a most excellent tool for designing and analysing digital filters.

First off, how do I use PyFDA?

My original (Linux) procedure to install PyFDA was:

conda create -n pyfda-dev python=3.11 -y
conda activate pyfda-dev
git clone https://github.com/chipmuenk/pyfda.git
cd pyfda
python -m pip install -r requirements.txt
python -m pip install -e .

Then to execute the app I just have a shell script containing the following:

source activate pyfda-dev
pyfdax

Now, when I want to update PyFDA I have another shell script containing the following:

source activate pyfda-dev
python -m pip uninstall pyfda -y
rm -rf pyfda
git clone https://github.com/chipmuenk/pyfda.git
cd pyfda
python -m pip install -e .

This has always worked really well for me but I recently needed to share a standalone executable version for Windows so I needed to add a little bit to the procedure:

conda create -n pyfda-dev python=3.11 -y
conda activate pyfda-dev
git clone https://github.com/chipmuenk/pyfda.git
cd pyfda
python -m pip install -r requirements.txt
python -m pip install -e .
python -m pip uninstall pyfda -y
python -m pip install pyinstaller pyinstaller-hooks-contrib
python -m PyInstaller --clean --noconfirm pyfdax.spec
dist\pyfdax.exe
 

Pyfdax.exe is now a completely standalone executable and can be used on any computer without installing Python.

One final note about exporting IIR filter coefficients as Biquad (Second Order) sections
This functionality is on the roadmap but no worries, I just wrote a couple of python scripts to convert either b,a or Pole/Zero format .npz files to SOS .csv files. You can find these scripts as part of the SigLib DSP Library: https://github.com/Numerix-DSP/siglib/tree/main/Python/PyFDA.