From: n4hy Date: Wed, 1 Oct 2008 17:18:13 +0000 (+0000) Subject: when gr_firdes.i was last touched, my version 2 filter design programs were removed... X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=d9b0663b0170c7f5958df900ce68f15ea2b0434f;p=debian%2Fgnuradio 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 --- diff --git a/gnuradio-core/src/lib/general/gr_firdes.h b/gnuradio-core/src/lib/general/gr_firdes.h index bb62dad8..7b30084d 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 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 6fbe27f6..4ac9855d 100644 --- a/gnuradio-core/src/lib/general/gr_firdes.i +++ b/gnuradio-core/src/lib/general/gr_firdes.i @@ -42,6 +42,31 @@ class gr_firdes { double beta = 6.76 // used only with Kaiser ) 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 + 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 *