diff options
author | n4hy | 2008-10-01 17:18:13 +0000 |
---|---|---|
committer | n4hy | 2008-10-01 17:18:13 +0000 |
commit | d9b0663b0170c7f5958df900ce68f15ea2b0434f (patch) | |
tree | d1596262d1bfefad82e298837f7f66c543809e97 /gnuradio-core/src/lib/general | |
parent | 55a9ca4d4587de2d5a401d64d5eaf73717783388 (diff) | |
download | gnuradio-d9b0663b0170c7f5958df900ce68f15ea2b0434f.tar.gz gnuradio-d9b0663b0170c7f5958df900ce68f15ea2b0434f.tar.bz2 gnuradio-d9b0663b0170c7f5958df900ce68f15ea2b0434f.zip |
when gr_firdes.i was last touched, my version 2 filter design programs were removed from the swig file. Also added is appropriate remarks for the low_pass_2 only. More later
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9693 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/general')
-rw-r--r-- | gnuradio-core/src/lib/general/gr_firdes.h | 15 | ||||
-rw-r--r-- | gnuradio-core/src/lib/general/gr_firdes.i | 25 |
2 files changed, 40 insertions, 0 deletions
diff --git a/gnuradio-core/src/lib/general/gr_firdes.h b/gnuradio-core/src/lib/general/gr_firdes.h index bb62dad8f..7b30084d9 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.h +++ b/gnuradio-core/src/lib/general/gr_firdes.h @@ -68,6 +68,21 @@ class gr_firdes { win_type window = WIN_HAMMING, double beta = 6.76); // used only with Kaiser + /*! + * \brief use "window method" to design a low-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 required stopband attenuation + * The normalized width of the transition + * band is what sets the number of taps + * required. Narrow --> 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, diff --git a/gnuradio-core/src/lib/general/gr_firdes.i b/gnuradio-core/src/lib/general/gr_firdes.i index 6fbe27f67..4ac9855d2 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.i +++ b/gnuradio-core/src/lib/general/gr_firdes.i @@ -43,6 +43,31 @@ class gr_firdes { ) throw(std::out_of_range); /*! + * \brief use "window method" to design a low-pass FIR filter + * using alternative design criteria + * \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). + * The normalized width of the transition + * band is what sets the number of taps + * required. Narrow --> more taps + * \p attenuation_dB The required stop band attenuation in dB + * \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, + double cutoff_freq, // Hz center of transition band + double transition_width, // Hz width of transition band + double attenuation_dB, // out of band attenuation + win_type window = WIN_HAMMING, + double beta = 6.76 // used only with Kaiser + ) 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) |