mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
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.
template<typename realT>
void mx::sigproc::window::tukey (std::vector< realT > &filt, realT alpha)
 The Tukey Window.
template<typename realT>
void mx::sigproc::window::genCosine (realT *filt, size_t N, realT a0, realT a1)
 The generalized 2 parameter cosine Window.
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.
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.
template<typename realT>
void mx::sigproc::window::hann (realT *filt, int N)
 The Hann Window.
template<typename realT>
void mx::sigproc::window::hann (std::vector< realT > &filt)
 The Hann Window.
template<typename realT>
void mx::sigproc::window::hamming (realT *filt, int N)
 The Hamming Window.
template<typename realT>
void mx::sigproc::window::hamming (std::vector< realT > &filt)
 The Hamming Window.
template<typename realT>
void mx::sigproc::window::blackman (realT *filt, size_t N)
 The Blackman Window.
template<typename realT>
void mx::sigproc::window::blackman (std::vector< realT > &filt)
 The Blackman Window.
template<typename realT>
void mx::sigproc::window::exactBlackman (realT *filt, size_t N)
 The Exact Blackman Window.
template<typename realT>
void mx::sigproc::window::nuttal (realT *filt, size_t N)
 The Nuttal Window.
template<typename realT>
void mx::sigproc::window::nuttal (std::vector< realT > &filt)
 The Nuttal Window.
template<typename realT>
void mx::sigproc::window::blackmanNuttal (realT *filt, size_t N)
 The Blackman-Nuttal Windwo.
template<typename realT>
void mx::sigproc::window::blackmanNuttal (std::vector< realT > &filt)
 The Blackman-Nuttal Windwo.

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.

References genCosine().

Referenced by blackman().

◆ 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.

References blackman().

◆ 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.

References genCosine().

Referenced by blackmanNuttal().

◆ 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.

References blackmanNuttal().

◆ 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 genCosine().

Referenced by 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().

Referenced by blackman(), blackmanNuttal(), exactBlackman(), hamming(), hann(), and nuttal().

◆ 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.

References genCosine().

Referenced by hamming().

◆ 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.

References hamming().

◆ 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.

References genCosine().

Referenced by hann(), mx::AO::analysis::fourierTemporalPSD< _realT, aosysT >::intensityPSD(), and mx::AO::analysis::speckleAmpPSD().

◆ 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.

References hann().

◆ 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.

References genCosine().

Referenced by nuttal().

◆ 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.

References nuttal().

◆ 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().

Referenced by TEST_CASE(), and tukey().

◆ 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.

References tukey().