mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
1-D Window Functions

1-D window functions for spectral analysis

Functions

template<typename realT >
void mx::sigproc::window::tukey (realT *filt, int N, realT alpha)
 The Tukey Window. More...
 
template<typename realT >
void mx::sigproc::window::tukey (std::vector< realT > &filt, realT alpha)
 The Tukey Window. More...
 
template<typename realT >
void mx::sigproc::window::genCosine (realT *filt, size_t N, realT a0, realT a1)
 The generalized 2 parameter cosine Window. More...
 
template<typename realT >
void mx::sigproc::window::genCosine (realT *filt, size_t N, realT a0, realT a1, realT a2)
 The generalized 3 parameter cosine Window. More...
 
template<typename realT >
void mx::sigproc::window::genCosine (realT *filt, size_t N, realT a0, realT a1, realT a2, realT a3)
 The generalized 4 parameter cosine Window. More...
 
template<typename realT >
void mx::sigproc::window::hann (realT *filt, int N)
 The Hann Window. More...
 
template<typename realT >
void mx::sigproc::window::hann (std::vector< realT > &filt)
 The Hann Window. More...
 
template<typename realT >
void mx::sigproc::window::hamming (realT *filt, int N)
 The Hamming Window. More...
 
template<typename realT >
void mx::sigproc::window::hamming (std::vector< realT > &filt)
 The Hamming Window. More...
 
template<typename realT >
void mx::sigproc::window::blackman (realT *filt, size_t N)
 The Blackman Window. More...
 
template<typename realT >
void mx::sigproc::window::blackman (std::vector< realT > &filt)
 The Blackman Window. More...
 
template<typename realT >
void mx::sigproc::window::exactBlackman (realT *filt, size_t N)
 The Exact Blackman Window. More...
 
template<typename realT >
void mx::sigproc::window::nuttal (realT *filt, size_t N)
 The Nuttal Window. More...
 
template<typename realT >
void mx::sigproc::window::nuttal (std::vector< realT > &filt)
 The Nuttal Window. More...
 
template<typename realT >
void mx::sigproc::window::blackmanNuttal (realT *filt, size_t N)
 The Blackman-Nuttal Windwo. More...
 
template<typename realT >
void mx::sigproc::window::blackmanNuttal (std::vector< realT > &filt)
 The Blackman-Nuttal Windwo. More...
 

Function Documentation

◆ blackman() [1/2]

template<typename realT >
void mx::sigproc::window::blackman ( realT *  filt,
size_t  N 
)

The Blackman Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector

Definition at line 242 of file signalWindows.hpp.

◆ blackman() [2/2]

template<typename realT >
void mx::sigproc::window::blackman ( std::vector< realT > &  filt)

The Blackman Window.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter

Definition at line 259 of file signalWindows.hpp.

◆ blackmanNuttal() [1/2]

template<typename realT >
void mx::sigproc::window::blackmanNuttal ( realT *  filt,
size_t  N 
)

The Blackman-Nuttal Windwo.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector

Definition at line 330 of file signalWindows.hpp.

◆ blackmanNuttal() [2/2]

template<typename realT >
void mx::sigproc::window::blackmanNuttal ( std::vector< realT > &  filt)

The Blackman-Nuttal Windwo.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter

Definition at line 347 of file signalWindows.hpp.

◆ exactBlackman()

template<typename realT >
void mx::sigproc::window::exactBlackman ( realT *  filt,
size_t  N 
)

The Exact Blackman Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector

Definition at line 272 of file signalWindows.hpp.

References mx::sigproc::window::exactBlackman().

Referenced by mx::sigproc::window::exactBlackman().

◆ genCosine() [1/3]

template<typename realT >
void mx::sigproc::window::genCosine ( realT *  filt,
size_t  N,
realT  a0,
realT  a1 
)

The generalized 2 parameter cosine Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector
[in]a0parameter of the generalized cosine window
[in]a1parameter of the generalized cosine window

Definition at line 109 of file signalWindows.hpp.

References mx::math::pi().

◆ genCosine() [2/3]

template<typename realT >
void mx::sigproc::window::genCosine ( realT *  filt,
size_t  N,
realT  a0,
realT  a1,
realT  a2 
)

The generalized 3 parameter cosine Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector
[in]a0parameter of the generalized cosine window
[in]a1parameter of the generalized cosine window
[in]a2parameter of the generalized cosine window

Definition at line 131 of file signalWindows.hpp.

References mx::math::pi().

◆ genCosine() [3/3]

template<typename realT >
void mx::sigproc::window::genCosine ( realT *  filt,
size_t  N,
realT  a0,
realT  a1,
realT  a2,
realT  a3 
)

The generalized 4 parameter cosine Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector
[in]a0parameter of the generalized cosine window
[in]a1parameter of the generalized cosine window
[in]a2parameter of the generalized cosine window
[in]a3parameter of the generalized cosine window

Definition at line 154 of file signalWindows.hpp.

References mx::math::pi().

◆ hamming() [1/2]

template<typename realT >
void mx::sigproc::window::hamming ( realT *  filt,
int  N 
)

The Hamming Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated array to hold the filter
[in]Nthe size of the filter

Definition at line 211 of file signalWindows.hpp.

◆ hamming() [2/2]

template<typename realT >
void mx::sigproc::window::hamming ( std::vector< realT > &  filt)

The Hamming Window.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated vector to hold the filter

Definition at line 229 of file signalWindows.hpp.

◆ hann() [1/2]

template<typename realT >
void mx::sigproc::window::hann ( realT *  filt,
int  N 
)

The Hann Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated array to hold the filter
[in]Nthe size of the filter

Definition at line 179 of file signalWindows.hpp.

◆ hann() [2/2]

template<typename realT >
void mx::sigproc::window::hann ( std::vector< realT > &  filt)

The Hann Window.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated vector to hold the filter

Definition at line 197 of file signalWindows.hpp.

◆ nuttal() [1/2]

template<typename realT >
void mx::sigproc::window::nuttal ( realT *  filt,
size_t  N 
)

The Nuttal Window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter
[in]Nthe size of the filter vector

Definition at line 300 of file signalWindows.hpp.

◆ nuttal() [2/2]

template<typename realT >
void mx::sigproc::window::nuttal ( std::vector< realT > &  filt)

The Nuttal Window.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa real floating point type
Parameters
[out]filtThe pre-allocated vector which will store the filter

Definition at line 317 of file signalWindows.hpp.

◆ tukey() [1/2]

template<typename realT >
void mx::sigproc::window::tukey ( realT *  filt,
int  N,
realT  alpha 
)

The Tukey Window.

The width of the window is controlled by alpha. alpha = 0 is a square wave, alpha=1.0 is the Hann window.

See https://en.wikipedia.org/wiki/Window_function

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated array to hold the filter
[in]Nthe size of the filter
[in]alphathe width parameter

Definition at line 53 of file signalWindows.hpp.

References mx::math::pi().

◆ tukey() [2/2]

template<typename realT >
void mx::sigproc::window::tukey ( std::vector< realT > &  filt,
realT  alpha 
)

The Tukey Window.

The width of the window is controlled by alpha. alpha = 0 is a square wave, alpha=1.0 is the Hann window.

See https://en.wikipedia.org/wiki/Window_function

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Template Parameters
realTa floating point type
Parameters
[out]filtthe pre-allocated vector to hold the filter
[in]alphathe width parameter

Definition at line 94 of file signalWindows.hpp.