summaryrefslogtreecommitdiff
path: root/gr-filter
diff options
context:
space:
mode:
authorJosh Morman <jmorman@perspectalabs.com>2020-12-16 14:44:46 -0500
committerMarcus Müller <marcus@hostalia.de>2020-12-18 22:36:14 +0100
commit96a15f6b0d52f116ee9546be63dce90c4b90238f (patch)
tree60d01e0773a9becbb189eea782095efe5b4fab73 /gr-filter
parentaf408c76d0e4993e71a91051ed09c923749c6383 (diff)
filter: remove deprecated win_type duplicate in firdes
The win_type defined in firdes is marked as deprecated to be removed in 3.8, so let's go ahead and remove it and fix all the references Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
Diffstat (limited to 'gr-filter')
-rw-r--r--gr-filter/include/gnuradio/filter/firdes.h93
-rw-r--r--gr-filter/include/gnuradio/filter/hilbert_fc.h5
-rw-r--r--gr-filter/lib/firdes.cc36
-rw-r--r--gr-filter/lib/hilbert_fc_impl.cc7
-rw-r--r--gr-filter/lib/hilbert_fc_impl.h3
-rw-r--r--gr-filter/lib/qa_firdes.cc13
-rw-r--r--gr-filter/python/filter/bindings/firdes_python.cc44
-rw-r--r--gr-filter/python/filter/bindings/hilbert_fc_python.cc4
8 files changed, 90 insertions, 115 deletions
diff --git a/gr-filter/include/gnuradio/filter/firdes.h b/gr-filter/include/gnuradio/filter/firdes.h
index 12446d909e..37521098ef 100644
--- a/gr-filter/include/gnuradio/filter/firdes.h
+++ b/gr-filter/include/gnuradio/filter/firdes.h
@@ -28,23 +28,7 @@ namespace filter {
class FILTER_API firdes
{
public:
- // WARNING: deprecated, now located in gr::fft::window.
- // We will be removing this in 3.8.
- enum win_type {
- WIN_NONE = -1, //!< don't use a window
- WIN_HAMMING = 0, //!< Hamming window; max attenuation 53 dB
- WIN_HANN = 1, //!< Hann window; max attenuation 44 dB
- WIN_BLACKMAN = 2, //!< Blackman window; max attenuation 74 dB
- WIN_RECTANGULAR = 3, //!< Basic rectangular window
- WIN_KAISER = 4, //!< Kaiser window; max attenuation a function of beta, google it
- WIN_BLACKMAN_hARRIS = 5, //!< Blackman-harris window
- WIN_BLACKMAN_HARRIS =
- 5, //!< alias to WIN_BLACKMAN_hARRIS for capitalization consistency
- WIN_BARTLETT = 6, //!< Barlett (triangular) window
- WIN_FLATTOP = 7, //!< flat top window; useful in FFTs
- };
-
- static std::vector<float> window(win_type type, int ntaps, double beta);
+ static std::vector<float> window(fft::window::win_type type, int ntaps, double beta);
// ... class methods ...
@@ -58,7 +42,7 @@ public:
* \param sampling_freq sampling freq (Hz)
* \param cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -66,7 +50,7 @@ public:
double sampling_freq,
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -81,7 +65,7 @@ public:
* \param cutoff_freq beginning of transition band (Hz)
* \param transition_width width of transition band (Hz)
* \param attenuation_dB required stopband attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -90,7 +74,7 @@ public:
double cutoff_freq, // Hz beginning transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -103,7 +87,7 @@ public:
* \param sampling_freq sampling freq (Hz)
* \param cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -111,7 +95,7 @@ public:
double sampling_freq,
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -126,7 +110,7 @@ public:
* \param cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz).
* \param attenuation_dB out of band attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -135,7 +119,7 @@ public:
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -149,7 +133,7 @@ public:
* \param low_cutoff_freq center of transition band (Hz)
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz).
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -158,7 +142,7 @@ public:
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -174,7 +158,7 @@ public:
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz).
* \param attenuation_dB out of band attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -184,7 +168,7 @@ public:
double high_cutoff_freq, // Hz beginning transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
* \brief Use the "window method" to design a complex band-reject FIR
@@ -197,7 +181,7 @@ public:
* \param low_cutoff_freq center of transition band (Hz)
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<gr_complex>
@@ -206,7 +190,7 @@ public:
double low_cutoff_freq,
double high_cutoff_freq,
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -222,18 +206,18 @@ public:
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
* \param attenuation_dB out of band attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
- static std::vector<gr_complex>
- complex_band_reject_2(double gain,
- double sampling_freq,
- double low_cutoff_freq, // Hz beginning transition band
- double high_cutoff_freq, // Hz beginning transition band
- double transition_width, // Hz width of transition band
- double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
- double beta = 6.76); // used only with Kaiser
+ static std::vector<gr_complex> complex_band_reject_2(
+ double gain,
+ double sampling_freq,
+ double low_cutoff_freq, // Hz beginning transition band
+ double high_cutoff_freq, // Hz beginning transition band
+ double transition_width, // Hz width of transition band
+ double attenuation_dB, // out of band attenuation dB
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
+ double beta = 6.76); // used only with Kaiser
/*!
* \brief Use the "window method" to design a complex band-pass FIR
@@ -246,7 +230,7 @@ public:
* \param low_cutoff_freq center of transition band (Hz)
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<gr_complex>
@@ -255,7 +239,7 @@ public:
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -271,7 +255,7 @@ public:
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
* \param attenuation_dB out of band attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<gr_complex>
@@ -281,7 +265,7 @@ public:
double high_cutoff_freq, // Hz beginning transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -295,7 +279,7 @@ public:
* \param low_cutoff_freq center of transition band (Hz)
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz)
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -304,7 +288,7 @@ public:
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!
@@ -320,7 +304,7 @@ public:
* \param high_cutoff_freq center of transition band (Hz)
* \param transition_width width of transition band (Hz).
* \param attenuation_dB out of band attenuation
- * \param window one of firdes::win_type
+ * \param window one of fft::window::win_type
* \param beta parameter for Kaiser window
*/
static std::vector<float>
@@ -330,18 +314,19 @@ public:
double high_cutoff_freq, // Hz beginning transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // out of band attenuation dB
- win_type window = WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76); // used only with Kaiser
/*!\brief design a Hilbert Transform Filter
*
* \param ntaps number of taps, must be odd
- * \param windowtype one kind of firdes::win_type
+ * \param windowtype one kind of fft::window::win_type
* \param beta parameter for Kaiser window
*/
- static std::vector<float> hilbert(unsigned int ntaps = 19,
- win_type windowtype = WIN_RECTANGULAR,
- double beta = 6.76);
+ static std::vector<float>
+ hilbert(unsigned int ntaps = 19,
+ fft::window::win_type windowtype = fft::window::win_type::WIN_RECTANGULAR,
+ double beta = 6.76);
/*!
* \brief design a Root Cosine FIR Filter (do we need a window?)
@@ -384,7 +369,7 @@ private:
static int compute_ntaps(double sampling_freq,
double transition_width,
- win_type window_type,
+ fft::window::win_type window_type,
double beta);
static int compute_ntaps_windes(double sampling_freq,
diff --git a/gr-filter/include/gnuradio/filter/hilbert_fc.h b/gr-filter/include/gnuradio/filter/hilbert_fc.h
index 485202987f..a365fcb79b 100644
--- a/gr-filter/include/gnuradio/filter/hilbert_fc.h
+++ b/gr-filter/include/gnuradio/filter/hilbert_fc.h
@@ -11,6 +11,7 @@
#ifndef INCLUDED_FILTER_HILBERT_FC_H
#define INCLUDED_FILTER_HILBERT_FC_H
+#include <gnuradio/fft/window.h>
#include <gnuradio/filter/api.h>
#include <gnuradio/filter/firdes.h>
#include <gnuradio/sync_block.h>
@@ -38,11 +39,11 @@ public:
* Build a Hilbert transformer filter block.
*
* \param ntaps The number of taps for the filter.
- * \param window Window type (see firdes::win_type) to use.
+ * \param window Window type (see fft::window::win_type) to use.
* \param beta Beta value for a Kaiser window.
*/
static sptr make(unsigned int ntaps,
- firdes::win_type window = firdes::WIN_HAMMING,
+ fft::window::win_type window = fft::window::win_type::WIN_HAMMING,
double beta = 6.76);
};
diff --git a/gr-filter/lib/firdes.cc b/gr-filter/lib/firdes.cc
index 85716ea80c..4b29cccaab 100644
--- a/gr-filter/lib/firdes.cc
+++ b/gr-filter/lib/firdes.cc
@@ -21,9 +21,9 @@ using std::vector;
namespace gr {
namespace filter {
-std::vector<float> firdes::window(win_type type, int ntaps, double beta)
+std::vector<float> firdes::window(fft::window::win_type type, int ntaps, double beta)
{
- return fft::window::build(static_cast<fft::window::win_type>(type), ntaps, beta);
+ return fft::window::build(type, ntaps, beta);
}
//
@@ -35,7 +35,7 @@ vector<float> firdes::low_pass_2(double gain,
double cutoff_freq, // Hz BEGINNING of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_1f(sampling_freq, cutoff_freq, transition_width);
@@ -78,7 +78,7 @@ vector<float> firdes::low_pass(double gain,
double sampling_freq,
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_1f(sampling_freq, cutoff_freq, transition_width);
@@ -128,7 +128,7 @@ vector<float> firdes::high_pass_2(double gain,
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_1f(sampling_freq, cutoff_freq, transition_width);
@@ -172,7 +172,7 @@ vector<float> firdes::high_pass(double gain,
double sampling_freq,
double cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_1f(sampling_freq, cutoff_freq, transition_width);
@@ -221,7 +221,7 @@ vector<float> firdes::band_pass_2(double gain,
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -264,7 +264,7 @@ vector<float> firdes::band_pass(double gain,
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -314,7 +314,7 @@ firdes::complex_band_pass_2(double gain,
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f_c(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -357,7 +357,7 @@ firdes::complex_band_pass(double gain,
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f_c(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -405,7 +405,7 @@ firdes::complex_band_reject_2(double gain,
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f_c(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -449,7 +449,7 @@ firdes::complex_band_reject(double gain,
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f_c(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -497,7 +497,7 @@ firdes::band_reject_2(double gain,
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
double attenuation_dB, // attenuation dB
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -541,7 +541,7 @@ vector<float> firdes::band_reject(double gain,
double low_cutoff_freq, // Hz center of transition band
double high_cutoff_freq, // Hz center of transition band
double transition_width, // Hz width of transition band
- win_type window_type,
+ fft::window::win_type window_type,
double beta) // used only with Kaiser
{
sanity_check_2f(sampling_freq, low_cutoff_freq, high_cutoff_freq, transition_width);
@@ -584,7 +584,8 @@ vector<float> firdes::band_reject(double gain,
// Hilbert Transform
//
-vector<float> firdes::hilbert(unsigned int ntaps, win_type windowtype, double beta)
+vector<float>
+firdes::hilbert(unsigned int ntaps, fft::window::win_type windowtype, double beta)
{
if (!(ntaps & 1))
throw std::out_of_range("Hilbert: Must have odd number of taps");
@@ -702,11 +703,10 @@ int firdes::compute_ntaps_windes(
int firdes::compute_ntaps(double sampling_freq,
double transition_width,
- win_type window_type,
+ fft::window::win_type window_type,
double beta)
{
- double a = fft::window::max_attenuation(
- static_cast<fft::window::win_type>(window_type), beta);
+ double a = fft::window::max_attenuation(window_type, beta);
int ntaps = (int)(a * sampling_freq / (22.0 * transition_width));
if ((ntaps & 1) == 0) // if even...
ntaps++; // ...make odd
diff --git a/gr-filter/lib/hilbert_fc_impl.cc b/gr-filter/lib/hilbert_fc_impl.cc
index 2d9e76333d..b60b1a0cb1 100644
--- a/gr-filter/lib/hilbert_fc_impl.cc
+++ b/gr-filter/lib/hilbert_fc_impl.cc
@@ -13,6 +13,7 @@
#endif
#include "hilbert_fc_impl.h"
+#include <gnuradio/fft/window.h>
#include <gnuradio/io_signature.h>
#include <volk/volk.h>
@@ -20,12 +21,14 @@ namespace gr {
namespace filter {
hilbert_fc::sptr
-hilbert_fc::make(unsigned int ntaps, firdes::win_type window, double beta)
+hilbert_fc::make(unsigned int ntaps, fft::window::win_type window, double beta)
{
return gnuradio::make_block_sptr<hilbert_fc_impl>(ntaps, window, beta);
}
-hilbert_fc_impl::hilbert_fc_impl(unsigned int ntaps, firdes::win_type window, double beta)
+hilbert_fc_impl::hilbert_fc_impl(unsigned int ntaps,
+ fft::window::win_type window,
+ double beta)
: sync_block("hilbert_fc",
io_signature::make(1, 1, sizeof(float)),
io_signature::make(1, 1, sizeof(gr_complex))),
diff --git a/gr-filter/lib/hilbert_fc_impl.h b/gr-filter/lib/hilbert_fc_impl.h
index 89be5c4cd2..bd0f2415fa 100644
--- a/gr-filter/lib/hilbert_fc_impl.h
+++ b/gr-filter/lib/hilbert_fc_impl.h
@@ -11,6 +11,7 @@
#ifndef INCLUDED_FILTER_HILBERT_FC_IMPL_H
#define INCLUDED_FILTER_HILBERT_FC_IMPL_H
+#include <gnuradio/fft/window.h>
#include <gnuradio/filter/fir_filter.h>
#include <gnuradio/filter/hilbert_fc.h>
#include <gnuradio/types.h>
@@ -26,7 +27,7 @@ private:
public:
hilbert_fc_impl(unsigned int ntaps,
- firdes::win_type window = firdes::WIN_HAMMING,
+ fft::window::win_type window = fft::window::WIN_HAMMING,
double beta = 6.76);
int work(int noutput_items,
diff --git a/gr-filter/lib/qa_firdes.cc b/gr-filter/lib/qa_firdes.cc
index 729d23369f..ab90276b7d 100644
--- a/gr-filter/lib/qa_firdes.cc
+++ b/gr-filter/lib/qa_firdes.cc
@@ -134,7 +134,7 @@ const static float t6_exp[] = { // bandpass
BOOST_AUTO_TEST_CASE(t1)
{
- vector<float> taps = firdes::low_pass(1.0, 8000, 1750, 500, firdes::WIN_HAMMING);
+ vector<float> taps = firdes::low_pass(1.0, 8000, 1750, 500, fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
@@ -148,7 +148,8 @@ BOOST_AUTO_TEST_CASE(t1)
BOOST_AUTO_TEST_CASE(t2)
{
- vector<float> taps = firdes::high_pass(1.0, 8000, 1750, 500, firdes::WIN_HAMMING);
+ vector<float> taps =
+ firdes::high_pass(1.0, 8000, 1750, 500, fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
@@ -168,7 +169,7 @@ BOOST_AUTO_TEST_CASE(t3)
5.75e6 - (5.28e6 / 2),
5.75e6 + (5.28e6 / 2),
0.62e6,
- firdes::WIN_HAMMING);
+ fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
@@ -184,7 +185,7 @@ BOOST_AUTO_TEST_CASE(t3)
BOOST_AUTO_TEST_CASE(t4)
{
vector<float> taps =
- firdes::low_pass_2(1.0, 8000, 1750, 500, 66, firdes::WIN_HAMMING);
+ firdes::low_pass_2(1.0, 8000, 1750, 500, 66, fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
@@ -199,7 +200,7 @@ BOOST_AUTO_TEST_CASE(t4)
BOOST_AUTO_TEST_CASE(t5)
{
vector<float> taps =
- firdes::high_pass_2(1.0, 8000, 1750, 500, 66, firdes::WIN_HAMMING);
+ firdes::high_pass_2(1.0, 8000, 1750, 500, 66, fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
@@ -220,7 +221,7 @@ BOOST_AUTO_TEST_CASE(t6)
5.75e6 + (5.28e6 / 2),
0.62e6,
66,
- firdes::WIN_HAMMING);
+ fft::window::WIN_HAMMING);
// std::cout << "ntaps: " << taps.size() << std::endl;
// print_taps(std::cout, taps);
diff --git a/gr-filter/python/filter/bindings/firdes_python.cc b/gr-filter/python/filter/bindings/firdes_python.cc
index 3e697a1213..fc7cf78866 100644
--- a/gr-filter/python/filter/bindings/firdes_python.cc
+++ b/gr-filter/python/filter/bindings/firdes_python.cc
@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(firdes.h) */
-/* BINDTOOL_HEADER_FILE_HASH(0b2837cc3e5dcdc4435575d7ce1950df) */
+/* BINDTOOL_HEADER_FILE_HASH(afeccb5d25e3c88b1dcfc23d3542ec0b) */
/***********************************************************************************/
#include <pybind11/complex.h>
@@ -33,21 +33,6 @@ void bind_firdes(py::module& m)
py::class_<firdes, std::shared_ptr<firdes>> firdes_class(m, "firdes", D(firdes));
- py::enum_<gr::filter::firdes::win_type>(firdes_class, "win_type")
- .value("WIN_NONE", gr::filter::firdes::WIN_NONE) // -1
- .value("WIN_HAMMING", gr::filter::firdes::WIN_HAMMING) // 0
- .value("WIN_HANN", gr::filter::firdes::WIN_HANN) // 1
- .value("WIN_BLACKMAN", gr::filter::firdes::WIN_BLACKMAN) // 2
- .value("WIN_RECTANGULAR", gr::filter::firdes::WIN_RECTANGULAR) // 3
- .value("WIN_KAISER", gr::filter::firdes::WIN_KAISER) // 4
- .value("WIN_BLACKMAN_hARRIS", gr::filter::firdes::WIN_BLACKMAN_hARRIS) // 5
- .value("WIN_BLACKMAN_HARRIS", gr::filter::firdes::WIN_BLACKMAN_HARRIS) // 5
- .value("WIN_BARTLETT", gr::filter::firdes::WIN_BARTLETT) // 6
- .value("WIN_FLATTOP", gr::filter::firdes::WIN_FLATTOP) // 7
- .export_values();
-
- py::implicitly_convertible<int, gr::filter::firdes::win_type>();
-
firdes_class
.def_static("window",
&firdes::window,
@@ -63,7 +48,7 @@ void bind_firdes(py::module& m)
py::arg("sampling_freq"),
py::arg("cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, low_pass))
@@ -75,7 +60,7 @@ void bind_firdes(py::module& m)
py::arg("cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, low_pass_2))
@@ -86,7 +71,7 @@ void bind_firdes(py::module& m)
py::arg("sampling_freq"),
py::arg("cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, high_pass))
@@ -98,7 +83,7 @@ void bind_firdes(py::module& m)
py::arg("cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, high_pass_2))
@@ -110,7 +95,7 @@ void bind_firdes(py::module& m)
py::arg("low_cutoff_freq"),
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, band_pass))
@@ -123,7 +108,7 @@ void bind_firdes(py::module& m)
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, band_pass_2))
@@ -135,7 +120,7 @@ void bind_firdes(py::module& m)
py::arg("low_cutoff_freq"),
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, complex_band_pass))
@@ -148,7 +133,7 @@ void bind_firdes(py::module& m)
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, complex_band_pass_2))
@@ -160,7 +145,7 @@ void bind_firdes(py::module& m)
py::arg("low_cutoff_freq"),
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, band_reject))
@@ -173,7 +158,7 @@ void bind_firdes(py::module& m)
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, band_reject_2))
@@ -185,7 +170,7 @@ void bind_firdes(py::module& m)
py::arg("low_cutoff_freq"),
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, complex_band_reject))
@@ -198,7 +183,7 @@ void bind_firdes(py::module& m)
py::arg("high_cutoff_freq"),
py::arg("transition_width"),
py::arg("attenuation_dB"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(firdes, complex_band_reject_2))
@@ -206,8 +191,7 @@ void bind_firdes(py::module& m)
.def_static("hilbert",
&firdes::hilbert,
py::arg("ntaps") = 19,
- py::arg("windowtype") =
- ::gr::filter::firdes::win_type::WIN_RECTANGULAR,
+ py::arg("windowtype") = ::gr::fft::window::win_type::WIN_RECTANGULAR,
py::arg("beta") = 6.7599999999999998,
D(firdes, hilbert))
diff --git a/gr-filter/python/filter/bindings/hilbert_fc_python.cc b/gr-filter/python/filter/bindings/hilbert_fc_python.cc
index 35cbe68753..ceb660471b 100644
--- a/gr-filter/python/filter/bindings/hilbert_fc_python.cc
+++ b/gr-filter/python/filter/bindings/hilbert_fc_python.cc
@@ -14,7 +14,7 @@
/* BINDTOOL_GEN_AUTOMATIC(0) */
/* BINDTOOL_USE_PYGCCXML(0) */
/* BINDTOOL_HEADER_FILE(hilbert_fc.h) */
-/* BINDTOOL_HEADER_FILE_HASH(e204e5877a924c21b62513d8e83e952d) */
+/* BINDTOOL_HEADER_FILE_HASH(3f5ee100c05bf0b167c39a017a65b9eb) */
/***********************************************************************************/
#include <pybind11/complex.h>
@@ -40,7 +40,7 @@ void bind_hilbert_fc(py::module& m)
.def(py::init(&hilbert_fc::make),
py::arg("ntaps"),
- py::arg("window") = ::gr::filter::firdes::win_type::WIN_HAMMING,
+ py::arg("window") = ::gr::fft::window::win_type::WIN_HAMMING,
py::arg("beta") = 6.7599999999999998,
D(hilbert_fc, make));
}