Changeset 9713

Show
Ignore:
Timestamp:
10/04/08 13:01:01
Author:
n4hy
Message:

completion of adding new filter design interfaces to gr_firdes.i. Still need to add tests to qa code

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.h

    r9707 r9713  
    7878   * \p attenuation_dB          required stopband attenuation 
    7979   *                            The normalized width of the transition 
    80    *                            band is what sets the number of taps 
    81    *                            required.  Narrow --> more taps 
    82    * \p window_type:            What kind of window to use. Determines 
    83    *                            maximum attenuation and passband ripple. 
    84    * \p beta:                   parameter for Kaiser window 
    85    */ 
     80   *                            band and the required stop band 
     81   *                            attenuation is what sets the number of taps 
     82   *                            required.  Narrow --> more taps 
     83   *                            More attenuatin --> more taps 
     84   * \p window_type:            What kind of window to use. Determines 
     85   *                            maximum attenuation and passband ripple. 
     86   * \p beta:                   parameter for Kaiser window 
     87   */ 
     88 
    8689  static std::vector<float> 
    8790  low_pass_2 (double gain, 
     
    125128   * \p attenuation_dB          out of band attenuation 
    126129   *                            The normalized width of the transition 
    127    *                            band is what sets the number of taps 
    128    *                            required.  Narrow --> more taps 
     130   *                            band and the required stop band 
     131   *                            attenuation is what sets the number of taps 
     132   *                            required.  Narrow --> more taps 
     133   *                            More attenuation --> more taps 
    129134   * \p window_type:            What kind of window to use. Determines 
    130135   *                            maximum attenuation and passband ripple. 
     
    175180   * \p attenuation_dB          out of band attenuation 
    176181   *                            The normalized width of the transition 
    177    *                            band is what sets the number of taps 
    178    *                            required.  Narrow --> more taps 
    179    * \p window_type:            What kind of window to use. Determines 
    180    *                            maximum attenuation and passband ripple. 
    181    * \p beta:                   parameter for Kaiser window 
    182    */ 
     182   *                            band and the required stop band 
     183   *                            attenuation is what sets the number of taps 
     184   *                            required.  Narrow --> more taps 
     185   *                            More attenuation --> more taps 
     186   * \p window_type:            What kind of window to use. Determines 
     187   *                            maximum attenuation and passband ripple. 
     188   * \p beta:                   parameter for Kaiser window 
     189   */ 
     190 
    183191  static std::vector<float> 
    184192  band_pass_2 (double gain, 
     
    226234   * \p attenuation_dB          out of band attenuation 
    227235   *                            The normalized width of the transition 
    228    *                            band is what sets the number of taps 
    229    *                            required.  Narrow --> more taps 
     236   *                            band and the required stop band 
     237   *                            attenuation is what sets the number of taps 
     238   *                            required.  Narrow --> more taps 
     239   *                            More attenuation --> more taps 
    230240   * \p window_type:            What kind of window to use. Determines 
    231241   *                            maximum attenuation and passband ripple. 
     
    278288   * \p attenuation_dB          out of band attenuation 
    279289   *                            The normalized width of the transition 
    280    *                            band is what sets the number of taps 
    281    *                            required.  Narrow --> more taps 
     290   *                            band and the required stop band 
     291   *                            attenuation is what sets the number of taps 
     292   *                            required.  Narrow --> more taps 
     293   *                            More attenuation --> more taps 
    282294   * \p window_type:            What kind of window to use. Determines 
    283295   *                            maximum attenuation and passband ripple. 
  • gnuradio/trunk/gnuradio-core/src/lib/general/gr_firdes.i

    r9707 r9713  
    5252   * \p attenuation_dB          out of band attenuation 
    5353   *                            The normalized width of the transition 
    54    *                            band is what sets the number of taps 
    55    *                            required.  Narrow --> more taps 
    56    * \p attenuation_dB          The required stop band attenuation in dB 
     54   *                            band and the required stop band 
     55   *                            attenuation is what sets the number of taps 
     56   *                            required.  Narrow --> more taps 
     57   *                            More attenuation --> more taps 
    5758   * \p window_type:            What kind of window to use. Determines 
    5859   *                            maximum attenuation and passband ripple. 
     
    8384   * \p beta:                   parameter for Kaiser window 
    8485   */ 
     86 
    8587  static std::vector<float> 
    8688  high_pass (double gain, 
     
    9395 
    9496  /*! 
     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  /*! 
    95125   * \brief use "window method" to design a band-pass FIR filter 
    96126   * 
     
    107137   * \p beta:                   parameter for Kaiser window 
    108138   */ 
     139 
    109140  static std::vector<float> 
    110141  band_pass (double gain, 
     
    117148             ) throw(std::out_of_range);  
    118149 
     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 
    119179 
    120180  /*! 
     
    144204             ) throw(std::out_of_range);  
    145205 
     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 
    146235 
    147236  /*! 
     
    171260               ) throw(std::out_of_range); 
    172261 
     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 
    173292  /*!\brief design a Hilbert Transform Filter 
    174293   *