diff options
-rw-r--r-- | gr-filter/grc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-filter/grc/filter_fft_low_pass_filter.block.yml | 79 |
2 files changed, 80 insertions, 0 deletions
diff --git a/gr-filter/grc/CMakeLists.txt b/gr-filter/grc/CMakeLists.txt index f6d6e59f80..97f6d3b8fb 100644 --- a/gr-filter/grc/CMakeLists.txt +++ b/gr-filter/grc/CMakeLists.txt @@ -21,6 +21,7 @@ install(FILES filter.tree.yml filter_dc_blocker_xx.block.yml filter_fft_filter_xxx.block.yml + filter_fft_low_pass_filter.block.yml filter_fir_filter_xxx.block.yml filter_filter_delay_fc.block.yml filter_filterbank_vcvcf.block.yml diff --git a/gr-filter/grc/filter_fft_low_pass_filter.block.yml b/gr-filter/grc/filter_fft_low_pass_filter.block.yml new file mode 100644 index 0000000000..4169d7a287 --- /dev/null +++ b/gr-filter/grc/filter_fft_low_pass_filter.block.yml @@ -0,0 +1,79 @@ +# auto-generated by grc.converter + +id: filter_fft_low_pass_filter +label: FFT Low Pass Filter +category: '[Core]/Filters' + +parameters: +- id: type + label: Type + dtype: enum + options: [ccc, ccf, fff] + option_labels: [Complex->Complex (Complex Taps), Complex->Complex (Real Taps), + Float->Float (Real Taps)] + option_attributes: + input: [complex, complex, float] + output: [complex, complex, float] + taps: [complex_vector, float_vector, float_vector] + hide: part +- id: decim + label: Decimation + dtype: int + default: '1' +- id: gain + label: Gain + dtype: real + default: '1' +- id: samp_rate + label: Sample Rate + dtype: real + default: samp_rate +- id: cutoff_freq + label: Cutoff Freq + dtype: real +- id: width + label: Transition Width + dtype: real +- id: win + label: Window + dtype: int + default: firdes.WIN_HAMMING + options: [firdes.WIN_HAMMING, firdes.WIN_HANN, firdes.WIN_BLACKMAN, firdes.WIN_RECTANGULAR, + firdes.WIN_KAISER] + option_labels: [Hamming, Hann, Blackman, Rectangular, Kaiser] +- id: beta + label: Beta + dtype: real + default: '6.76' +- id: nthreads + label: Num. Threads + dtype: int + default: '1' + +inputs: +- domain: stream + dtype: ${ type.input } + +outputs: +- domain: stream + dtype: ${ type.output } + +templates: + imports: |- + from gnuradio import filter + from gnuradio.filter import firdes + make: filter.fft_filter_${type}(${decim}, firdes.low_pass(${gain}, ${samp_rate}, + ${cutoff_freq}, ${width}, ${win}, ${beta}), ${nthreads}) + callbacks: + - set_taps(firdes.low_pass(${gain}, ${samp_rate}, ${cutoff_freq}, ${width}, ${win}, + ${beta})) + - set_nthreads(${nthreads}) + +documentation: |- + This filter is a convenience wrapper for an FFT-based low-pass filter. + + Sample rate, cutoff frequency, and transition width are in Hertz. + + The beta paramater only applies to the Kaiser window. + +file_format: 1 |