I would like to set the stopband attenuation value for a bandpass filter in GNU Radio Companion. The standard Band Pass Filter block does not allow to set this parameter, but uses a default.
Does anybody know how this could be done?
I tried the following:
you don't need to write an embedded block to use the Filter design tools GNU Radio brings – you can just use Python as the "taps" parameter of an existing FIR filter block (instead of just typing in your filter tap vector, e.g. [1,2,3,4]
), i.e., add an "Import" block, where you from gnuradio.filter import optfir
, and use optfir.whatever(...)
as "Taps" parameter.
Other than that, GNU Radio's forte is not designing specialized filters, honestly :) I do recomment the excellent pyFDA; I'd install it locally using
python3 -m venv filter-design
source ./filter-design/bin/activate
pip3 install pyfda
pyfdax
and use it to design your favorite filter, if you don't need to re-design it programmatically on the fly.