| | 97 | * \brief use "window method" to design a high-pass FIR filter |
|---|
| | 98 | * |
|---|
| | 99 | * \p gain: overall gain of filter (typically 1.0) |
|---|
| | 100 | * \p sampling_freq: sampling freq (Hz) |
|---|
| | 101 | * \p cutoff_freq: center of transition band (Hz) |
|---|
| | 102 | * \p transition_width: width of transition band (Hz). |
|---|
| | 103 | * \p attenuation_dB out of band attenuation |
|---|
| | 104 | * The normalized width of the transition |
|---|
| | 105 | * band and the required stop band |
|---|
| | 106 | * attenuation is what sets the number of taps |
|---|
| | 107 | * required. Narrow --> more taps |
|---|
| | 108 | * More attenuation --> more taps |
|---|
| | 109 | * \p window_type: What kind of window to use. Determines |
|---|
| | 110 | * maximum attenuation and passband ripple. |
|---|
| | 111 | * \p beta: parameter for Kaiser window |
|---|
| | 112 | */ |
|---|
| | 113 | |
|---|
| | 114 | static std::vector<float> |
|---|
| | 115 | high_pass_2 (double gain, |
|---|
| | 116 | double sampling_freq, |
|---|
| | 117 | double cutoff_freq, // Hz center of transition band |
|---|
| | 118 | double transition_width, // Hz width of transition band |
|---|
| | 119 | double attenuation_dB, // out of band attenuation dB |
|---|
| | 120 | win_type window = WIN_HAMMING, |
|---|
| | 121 | double beta = 6.76); // used only with Kaiser |
|---|
| | 122 | |
|---|
| | 123 | |
|---|
| | 124 | /*! |
|---|
| | 150 | |
|---|
| | 151 | /*! |
|---|
| | 152 | * \brief use "window method" to design a band-pass FIR filter |
|---|
| | 153 | * |
|---|
| | 154 | * \p gain: overall gain of filter (typically 1.0) |
|---|
| | 155 | * \p sampling_freq: sampling freq (Hz) |
|---|
| | 156 | * \p low_cutoff_freq: center of transition band (Hz) |
|---|
| | 157 | * \p high_cutoff_freq: center of transition band (Hz) |
|---|
| | 158 | * \p transition_width: width of transition band (Hz). |
|---|
| | 159 | * \p attenuation_dB out of band attenuation |
|---|
| | 160 | * The normalized width of the transition |
|---|
| | 161 | * band and the required stop band |
|---|
| | 162 | * attenuation is what sets the number of taps |
|---|
| | 163 | * required. Narrow --> more taps |
|---|
| | 164 | * More attenuation --> more taps |
|---|
| | 165 | * \p window_type: What kind of window to use. Determines |
|---|
| | 166 | * maximum attenuation and passband ripple. |
|---|
| | 167 | * \p beta: parameter for Kaiser window |
|---|
| | 168 | */ |
|---|
| | 169 | |
|---|
| | 170 | static std::vector<float> |
|---|
| | 171 | band_pass_2 (double gain, |
|---|
| | 172 | double sampling_freq, |
|---|
| | 173 | double low_cutoff_freq, // Hz beginning transition band |
|---|
| | 174 | double high_cutoff_freq, // Hz beginning transition band |
|---|
| | 175 | double transition_width, // Hz width of transition band |
|---|
| | 176 | double attenuation_dB, // out of band attenuation dB |
|---|
| | 177 | win_type window = WIN_HAMMING, |
|---|
| | 178 | double beta = 6.76); // used only with Kaiser |
|---|
| | 206 | |
|---|
| | 207 | /*! |
|---|
| | 208 | * \brief use "window method" to design a complex band-pass FIR filter |
|---|
| | 209 | * |
|---|
| | 210 | * \p gain: overall gain of filter (typically 1.0) |
|---|
| | 211 | * \p sampling_freq: sampling freq (Hz) |
|---|
| | 212 | * \p low_cutoff_freq: center of transition band (Hz) |
|---|
| | 213 | * \p high_cutoff_freq: center of transition band (Hz) |
|---|
| | 214 | * \p transition_width: width of transition band (Hz). |
|---|
| | 215 | * \p attenuation_dB out of band attenuation |
|---|
| | 216 | * The normalized width of the transition |
|---|
| | 217 | * band and the required stop band |
|---|
| | 218 | * attenuation is what sets the number of taps |
|---|
| | 219 | * required. Narrow --> more taps |
|---|
| | 220 | * More attenuation --> more taps |
|---|
| | 221 | * \p window_type: What kind of window to use. Determines |
|---|
| | 222 | * maximum attenuation and passband ripple. |
|---|
| | 223 | * \p beta: parameter for Kaiser window |
|---|
| | 224 | */ |
|---|
| | 225 | |
|---|
| | 226 | static std::vector<gr_complex> |
|---|
| | 227 | complex_band_pass_2 (double gain, |
|---|
| | 228 | double sampling_freq, |
|---|
| | 229 | double low_cutoff_freq, // Hz beginning transition band |
|---|
| | 230 | double high_cutoff_freq, // Hz beginning transition band |
|---|
| | 231 | double transition_width, // Hz width of transition band |
|---|
| | 232 | double attenuation_dB, // out of band attenuation dB |
|---|
| | 233 | win_type window = WIN_HAMMING, |
|---|
| | 234 | double beta = 6.76); // used only with Kaiser |
|---|
| | 262 | |
|---|
| | 263 | /*! |
|---|
| | 264 | * \brief use "window method" to design a band-reject FIR filter |
|---|
| | 265 | * |
|---|
| | 266 | * \p gain: overall gain of filter (typically 1.0) |
|---|
| | 267 | * \p sampling_freq: sampling freq (Hz) |
|---|
| | 268 | * \p low_cutoff_freq: center of transition band (Hz) |
|---|
| | 269 | * \p high_cutoff_freq: center of transition band (Hz) |
|---|
| | 270 | * \p transition_width: width of transition band (Hz). |
|---|
| | 271 | * \p attenuation_dB out of band attenuation |
|---|
| | 272 | * The normalized width of the transition |
|---|
| | 273 | * band and the required stop band |
|---|
| | 274 | * attenuation is what sets the number of taps |
|---|
| | 275 | * required. Narrow --> more taps |
|---|
| | 276 | * More attenuation --> more taps |
|---|
| | 277 | * \p window_type: What kind of window to use. Determines |
|---|
| | 278 | * maximum attenuation and passband ripple. |
|---|
| | 279 | * \p beta: parameter for Kaiser window |
|---|
| | 280 | */ |
|---|
| | 281 | |
|---|
| | 282 | static std::vector<float> |
|---|
| | 283 | band_reject_2 (double gain, |
|---|
| | 284 | double sampling_freq, |
|---|
| | 285 | double low_cutoff_freq, // Hz beginning transition band |
|---|
| | 286 | double high_cutoff_freq, // Hz beginning transition band |
|---|
| | 287 | double transition_width, // Hz width of transition band |
|---|
| | 288 | double attenuation_dB, // out of band attenuation dB |
|---|
| | 289 | win_type window = WIN_HAMMING, |
|---|
| | 290 | double beta = 6.76); // used only with Kaiser |
|---|
| | 291 | |
|---|