GNU Radio 3.7.2 C++ API
gr::fft::window Class Reference

#include <gnuradio/fft/window.h>

Public Types

enum  win_type {
  WIN_NONE = -1, WIN_HAMMING = 0, WIN_HANN = 1, WIN_BLACKMAN = 2,
  WIN_RECTANGULAR = 3, WIN_KAISER = 4, WIN_BLACKMAN_hARRIS = 5, WIN_BLACKMAN_HARRIS = 5,
  WIN_BARTLETT = 6, WIN_FLATTOP = 7
}
 

Static Public Member Functions

static std::vector< float > coswindow (int ntaps, float c0, float c1, float c2)
 Helper function to build cosine-based windows. 3-coefficient version. More...
 
static std::vector< float > coswindow (int ntaps, float c0, float c1, float c2, float c3)
 Helper function to build cosine-based windows. 4-coefficient version. More...
 
static std::vector< float > coswindow (int ntaps, float c0, float c1, float c2, float c3, float c4)
 Helper function to build cosine-based windows. 5-coefficient version. More...
 
static std::vector< float > rectangular (int ntaps)
 Build a rectangular window. More...
 
static std::vector< float > hamming (int ntaps)
 Build a Hamming window. More...
 
static std::vector< float > hann (int ntaps)
 Build a Hann window (sometimes known as Hanning). More...
 
static std::vector< float > hanning (int ntaps)
 Alias to build a Hann window. More...
 
static std::vector< float > blackman (int ntaps)
 Build an exact Blackman window. More...
 
static std::vector< float > blackman2 (int ntaps)
 Build Blackman window, variation 1. More...
 
static std::vector< float > blackman3 (int ntaps)
 Build Blackman window, variation 2. More...
 
static std::vector< float > blackman4 (int ntaps)
 Build Blackman window, variation 3. More...
 
static std::vector< float > blackman_harris (int ntaps, int atten=92)
 Build a Blackman-harris window with a given attenuation. More...
 
static std::vector< float > blackmanharris (int ntaps, int atten=92)
 
static std::vector< float > nuttal (int ntaps)
 Build a Nuttal (or Blackman-Nuttal) window. More...
 
static std::vector< float > blackman_nuttal (int ntaps)
 Alias to the Nuttal window. More...
 
static std::vector< float > nuttal_cfd (int ntaps)
 Build a Nuttal continuous first derivative window. More...
 
static std::vector< float > flattop (int ntaps)
 Build a Nuttal continuous first derivative window. More...
 
static std::vector< float > kaiser (int ntaps, double beta)
 Build a Kaiser window with a given beta. More...
 
static std::vector< float > bartlett (int ntaps)
 Build a Barlett (triangular) window. More...
 
static std::vector< float > welch (int ntaps)
 
static std::vector< float > parzen (int ntaps)
 Build a Parzen (or de la Valle-Poussin) window. More...
 
static std::vector< float > exponential (int ntaps, double d)
 Build an exponential window with a given decay. More...
 
static std::vector< float > riemann (int ntaps)
 Build a Riemann window. More...
 
static std::vector< float > build (win_type type, int ntaps, double beta)
 Build a window using gr::fft::win_type to index the type of window desired. More...
 

Member Enumeration Documentation

Enumerator
WIN_NONE 

don't use a window

WIN_HAMMING 

Hamming window; max attenuation 53 dB.

WIN_HANN 

Hann window; max attenuation 44 dB.

WIN_BLACKMAN 

Blackman window; max attenuation 74 dB.

WIN_RECTANGULAR 

Basic rectangular window.

WIN_KAISER 

Kaiser window; max attenuation a function of beta, google it.

WIN_BLACKMAN_hARRIS 

Blackman-harris window.

WIN_BLACKMAN_HARRIS 

alias to WIN_BLACKMAN_hARRIS for capitalization consistency

WIN_BARTLETT 

Barlett (triangular) window.

WIN_FLATTOP 

flat top window; useful in FFTs

Member Function Documentation

static std::vector<float> gr::fft::window::bartlett ( int  ntaps)
static

Build a Barlett (triangular) window.

See:

  A. V. Oppenheim and R. W. Schafer, "Discrete-Time
  Signal Processing," Upper Saddle River, N.J.: Prentice
  Hall, 2010, pp. 535-538.
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::blackman ( int  ntaps)
static

Build an exact Blackman window.

See:

  A. V. Oppenheim and R. W. Schafer, "Discrete-Time
  Signal Processing," Upper Saddle River, N.J.: Prentice
  Hall, 2010, pp. 535-538.
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::blackman2 ( int  ntaps)
static

Build Blackman window, variation 1.

static std::vector<float> gr::fft::window::blackman3 ( int  ntaps)
static

Build Blackman window, variation 2.

static std::vector<float> gr::fft::window::blackman4 ( int  ntaps)
static

Build Blackman window, variation 3.

static std::vector<float> gr::fft::window::blackman_harris ( int  ntaps,
int  atten = 92 
)
static

Build a Blackman-harris window with a given attenuation.

    f. j. harris, "On the use of windows for harmonic analysis
    with the discrete Fourier transforms," Proc. IEEE, Vol. 66,
    ppg. 51-83, Jan. 1978.
Parameters
ntapsNumber of coefficients in the window.
attenAttenuation factor. Must be [61, 67, 74, 92]. See the above paper for details.
static std::vector<float> gr::fft::window::blackman_nuttal ( int  ntaps)
static

Alias to the Nuttal window.

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::blackmanharris ( int  ntaps,
int  atten = 92 
)
static

Alias to gr::fft::window::blakcman_harris.

static std::vector<float> gr::fft::window::build ( win_type  type,
int  ntaps,
double  beta 
)
static

Build a window using gr::fft::win_type to index the type of window desired.

Parameters
typea gr::fft::win_type index for the type of window.
ntapsNumber of coefficients in the window.
betaUsed only for building Kaiser windows.
static std::vector<float> gr::fft::window::coswindow ( int  ntaps,
float  c0,
float  c1,
float  c2 
)
static

Helper function to build cosine-based windows. 3-coefficient version.

static std::vector<float> gr::fft::window::coswindow ( int  ntaps,
float  c0,
float  c1,
float  c2,
float  c3 
)
static

Helper function to build cosine-based windows. 4-coefficient version.

static std::vector<float> gr::fft::window::coswindow ( int  ntaps,
float  c0,
float  c1,
float  c2,
float  c3,
float  c4 
)
static

Helper function to build cosine-based windows. 5-coefficient version.

static std::vector<float> gr::fft::window::exponential ( int  ntaps,
double  d 
)
static

Build an exponential window with a given decay.

See: http://en.wikipedia.org/wiki/Window_function#Exponential_or_Poisson_window

Parameters
ntapsNumber of coefficients in the window.
dDecay of d dB over half the window length.
static std::vector<float> gr::fft::window::flattop ( int  ntaps)
static

Build a Nuttal continuous first derivative window.

See: http://en.wikipedia.org/wiki/Window_function#Flat_top_window

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::hamming ( int  ntaps)
static

Build a Hamming window.

See:

  A. V. Oppenheim and R. W. Schafer, "Discrete-Time
  Signal Processing," Upper Saddle River, N.J.: Prentice
  Hall, 2010, pp. 535-538.
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::hann ( int  ntaps)
static

Build a Hann window (sometimes known as Hanning).

See:

  A. V. Oppenheim and R. W. Schafer, "Discrete-Time
  Signal Processing," Upper Saddle River, N.J.: Prentice
  Hall, 2010, pp. 535-538.
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::hanning ( int  ntaps)
static

Alias to build a Hann window.

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::kaiser ( int  ntaps,
double  beta 
)
static

Build a Kaiser window with a given beta.

See:

    A. V. Oppenheim and R. W. Schafer, "Discrete-Time
    Signal Processing," Upper Saddle River, N.J.: Prentice
    Hall, 2010, pp. 541-545.
Parameters
ntapsNumber of coefficients in the window.
betaShaping parameter of the window. See the discussion in Oppenheim and Schafer.
static std::vector<float> gr::fft::window::nuttal ( int  ntaps)
static

Build a Nuttal (or Blackman-Nuttal) window.

See: http://en.wikipedia.org/wiki/Window_function#Blackman.E2.80.93Nuttall_window

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::nuttal_cfd ( int  ntaps)
static

Build a Nuttal continuous first derivative window.

See: http://en.wikipedia.org/wiki/Window_function#Nuttall_window.2C_continuous_first_derivative

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::parzen ( int  ntaps)
static

Build a Parzen (or de la Valle-Poussin) window.

See:

  A. D. Poularikas, "Handbook of Formulas and Tables for
  Signal Processing," Springer, Oct 28, 1998
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::rectangular ( int  ntaps)
static

Build a rectangular window.

Taps are flat across the window.

Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::riemann ( int  ntaps)
static

Build a Riemann window.

See:

  A. D. Poularikas, "Handbook of Formulas and Tables for
  Signal Processing," Springer, Oct 28, 1998
Parameters
ntapsNumber of coefficients in the window.
static std::vector<float> gr::fft::window::welch ( int  ntaps)
static

The documentation for this class was generated from the following file: