diff options
author | 2015-04-08 12:30:22 -0700 | |
---|---|---|
committer | 2015-04-08 12:30:22 -0700 | |
commit | c022559679e21a60448591f2f4ff8fbf56ade836 (patch) | |
tree | a011bd2a80f941f45b910f3f2bb89f3ff268f63e /gr-filter/grc | |
parent | qtgui: no longer have a need for numpy library (diff) | |
download | gnuradio-c022559679e21a60448591f2f4ff8fbf56ade836.tar.xz gnuradio-c022559679e21a60448591f2f4ff8fbf56ade836.zip |
filter: add variable_low_pass_filter_taps
Convenience block in GRC to generate taps using
firdes.low_pass(...)
Diffstat (limited to 'gr-filter/grc')
-rw-r--r-- | gr-filter/grc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-filter/grc/filter_block_tree.xml | 4 | ||||
-rw-r--r-- | gr-filter/grc/variable_low_pass_filter_taps.xml | 75 |
3 files changed, 79 insertions, 1 deletions
diff --git a/gr-filter/grc/CMakeLists.txt b/gr-filter/grc/CMakeLists.txt index 575f6675d..2f7aa8ad8 100644 --- a/gr-filter/grc/CMakeLists.txt +++ b/gr-filter/grc/CMakeLists.txt @@ -45,6 +45,7 @@ install(FILES filter_band_pass_filter.xml filter_band_reject_filter.xml filter_root_raised_cosine_filter.xml + variable_low_pass_filter_taps.xml DESTINATION ${GRC_BLOCKS_DIR} COMPONENT "filter_python" ) diff --git a/gr-filter/grc/filter_block_tree.xml b/gr-filter/grc/filter_block_tree.xml index fbba9daf0..1c6eaa5e8 100644 --- a/gr-filter/grc/filter_block_tree.xml +++ b/gr-filter/grc/filter_block_tree.xml @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!-- - Copyright 2012 Free Software Foundation, Inc. + Copyright 2012,2015 Free Software Foundation, Inc. This file is part of GNU Radio @@ -30,6 +30,8 @@ <name></name> <!-- Blank for Root Name --> <cat> <name>Filters</name> + <!-- FIR filter tap generators --> + <block>variable_low_pass_filter_taps</block> <!-- FIR convenience filters --> <block>low_pass_filter</block> <block>high_pass_filter</block> diff --git a/gr-filter/grc/variable_low_pass_filter_taps.xml b/gr-filter/grc/variable_low_pass_filter_taps.xml new file mode 100644 index 000000000..e3367b1ec --- /dev/null +++ b/gr-filter/grc/variable_low_pass_filter_taps.xml @@ -0,0 +1,75 @@ +<?xml version="1.0"?> +<!-- +###################################################### +## Convenience wrapper around call to fides.low_pass() +###################################################### + --> +<block> + <name>Low-pass Filter Taps</name> + <key>variable_low_pass_filter_taps</key> + <import>from gnuradio.filter import firdes</import> + <var_make> +self.$(id) = $(id) = firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta) + </var_make> + <var_value>firdes.low_pass($gain, $samp_rate, $cutoff_freq, $width, $win, $beta)</var_value> + <make></make> + <param> + <name>Gain</name> + <key>gain</key> + <value>1.0</value> + <type>float</type> + </param> + <param> + <name>Sample Rate (Hz)</name> + <key>samp_rate</key> + <value>samp_rate</value> + <type>float</type> + </param> + <param> + <name>Cutoff Freq (Hz)</name> + <key>cutoff_freq</key> + <type>float</type> + </param> + <param> + <name>Transition Width (Hz)</name> + <key>width</key> + <type>float</type> + </param> + <param> + <name>Window</name> + <key>win</key> + <value>firdes.WIN_HAMMING</value> + <type>int</type> + <option> + <name>Hamming</name> + <key>firdes.WIN_HAMMING</key> + </option> + <option> + <name>Hann</name> + <key>firdes.WIN_HANN</key> + </option> + <option> + <name>Blackman</name> + <key>firdes.WIN_BLACKMAN</key> + </option> + <option> + <name>Rectangular</name> + <key>firdes.WIN_RECTANGULAR</key> + </option> + <option> + <name>Kaiser</name> + <key>firdes.WIN_KAISER</key> + </option> + </param> + <param> + <name>Beta</name> + <key>beta</key> + <value>6.76</value> + <type>float</type> + </param> + <doc> + This variable is a convenience wrapper around a call to firdes.low_pass(...). + + The beta paramater only applies to the Kaiser window. + </doc> +</block> |