[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r9713 - gnuradio/trunk/gnuradio-core/src/lib/general
From: |
n4hy |
Subject: |
[Commit-gnuradio] r9713 - gnuradio/trunk/gnuradio-core/src/lib/general |
Date: |
Sat, 4 Oct 2008 13:01:02 -0600 (MDT) |
Author: n4hy
Date: 2008-10-04 13:01:01 -0600 (Sat, 04 Oct 2008)
New Revision: 9713
Modified:
gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.h
gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.i
Log:
completion of adding new filter design interfaces to gr_firdes.i. Still need
to add tests to qa code
Modified: gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.h
===================================================================
--- gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.h 2008-10-04
18:38:57 UTC (rev 9712)
+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.h 2008-10-04
19:01:01 UTC (rev 9713)
@@ -77,12 +77,15 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB required stopband attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
+ * More attenuatin --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
*/
+
static std::vector<float>
low_pass_2 (double gain,
double sampling_freq,
@@ -124,8 +127,10 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB out of band attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
+ * More attenuation --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
@@ -174,12 +179,15 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB out of band attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
+ * More attenuation --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
*/
+
static std::vector<float>
band_pass_2 (double gain,
double sampling_freq,
@@ -225,8 +233,10 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB out of band attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
+ * More attenuation --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
@@ -277,8 +287,10 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB out of band attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
+ * More attenuation --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
Modified: gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.i
===================================================================
--- gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.i 2008-10-04
18:38:57 UTC (rev 9712)
+++ gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.i 2008-10-04
19:01:01 UTC (rev 9713)
@@ -51,9 +51,10 @@
* \p transition_width: width of transition band (Hz).
* \p attenuation_dB out of band attenuation
* The normalized width of the transition
- * band is what sets the number of taps
+ * band and the required stop band
+ * attenuation is what sets the number of taps
* required. Narrow --> more taps
- * \p attenuation_dB The required stop band attenuation in dB
+ * More attenuation --> more taps
* \p window_type: What kind of window to use. Determines
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
@@ -82,6 +83,7 @@
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
*/
+
static std::vector<float>
high_pass (double gain,
double sampling_freq,
@@ -92,6 +94,34 @@
) throw(std::out_of_range);
/*!
+ * \brief use "window method" to design a high-pass FIR filter
+ *
+ * \p gain: overall gain of filter (typically 1.0)
+ * \p sampling_freq: sampling freq (Hz)
+ * \p cutoff_freq: center of transition band (Hz)
+ * \p transition_width: width of transition band (Hz).
+ * \p attenuation_dB out of band attenuation
+ * The normalized width of the transition
+ * band and the required stop band
+ * attenuation is what sets the number of taps
+ * required. Narrow --> more taps
+ * More attenuation --> more taps
+ * \p window_type: What kind of window to use. Determines
+ * maximum attenuation and passband ripple.
+ * \p beta: parameter for Kaiser window
+ */
+
+ static std::vector<float>
+ high_pass_2 (double gain,
+ double sampling_freq,
+ 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,
+ double beta = 6.76); // used only with Kaiser
+
+
+ /*!
* \brief use "window method" to design a band-pass FIR filter
*
* \p gain: overall gain of filter (typically 1.0)
@@ -106,6 +136,7 @@
* maximum attenuation and passband ripple.
* \p beta: parameter for Kaiser window
*/
+
static std::vector<float>
band_pass (double gain,
double sampling_freq,
@@ -118,6 +149,35 @@
/*!
+ * \brief use "window method" to design a band-pass FIR filter
+ *
+ * \p gain: overall gain of filter (typically 1.0)
+ * \p sampling_freq: sampling freq (Hz)
+ * \p low_cutoff_freq: center of transition band (Hz)
+ * \p high_cutoff_freq: center of transition band (Hz)
+ * \p transition_width: width of transition band (Hz).
+ * \p attenuation_dB out of band attenuation
+ * The normalized width of the transition
+ * band and the required stop band
+ * attenuation is what sets the number of taps
+ * required. Narrow --> more taps
+ * More attenuation --> more taps
+ * \p window_type: What kind of window to use. Determines
+ * maximum attenuation and passband ripple.
+ * \p beta: parameter for Kaiser window
+ */
+
+ static std::vector<float>
+ band_pass_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
+
+ /*!
* \brief use "window method" to design a band-reject FIR filter
*
* \p gain: overall gain of filter (typically 1.0)
@@ -145,6 +205,35 @@
/*!
+ * \brief use "window method" to design a complex band-pass FIR filter
+ *
+ * \p gain: overall gain of filter (typically 1.0)
+ * \p sampling_freq: sampling freq (Hz)
+ * \p low_cutoff_freq: center of transition band (Hz)
+ * \p high_cutoff_freq: center of transition band (Hz)
+ * \p transition_width: width of transition band (Hz).
+ * \p attenuation_dB out of band attenuation
+ * The normalized width of the transition
+ * band and the required stop band
+ * attenuation is what sets the number of taps
+ * required. Narrow --> more taps
+ * More attenuation --> more taps
+ * \p window_type: What kind of window to use. Determines
+ * maximum attenuation and passband ripple.
+ * \p beta: parameter for Kaiser window
+ */
+
+ static std::vector<gr_complex>
+ complex_band_pass_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
+
+ /*!
* \brief use "window method" to design a band-reject FIR filter
*
* \p gain: overall gain of filter (typically 1.0)
@@ -170,6 +259,36 @@
double beta = 6.76
) throw(std::out_of_range);
+
+ /*!
+ * \brief use "window method" to design a band-reject FIR filter
+ *
+ * \p gain: overall gain of filter (typically 1.0)
+ * \p sampling_freq: sampling freq (Hz)
+ * \p low_cutoff_freq: center of transition band (Hz)
+ * \p high_cutoff_freq: center of transition band (Hz)
+ * \p transition_width: width of transition band (Hz).
+ * \p attenuation_dB out of band attenuation
+ * The normalized width of the transition
+ * band and the required stop band
+ * attenuation is what sets the number of taps
+ * required. Narrow --> more taps
+ * More attenuation --> more taps
+ * \p window_type: What kind of window to use. Determines
+ * maximum attenuation and passband ripple.
+ * \p beta: parameter for Kaiser window
+ */
+
+ static std::vector<float>
+ 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
+
/*!\brief design a Hilbert Transform Filter
*
* \p ntaps: Number of taps, must be odd
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r9713 - gnuradio/trunk/gnuradio-core/src/lib/general,
n4hy <=