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

2-D window functions for spectral analysis

Functions

template<typename realT >
void mx::sigproc::window::tukey2d (realT *filt, int rows, int cols, realT D, realT alpha, realT xc, realT yc)
 Create a 2-D Tukey window. More...
 
template<typename arrT >
void mx::sigproc::window::tukey2d (arrT &filt, typename arrT::Scalar D, typename arrT::Scalar alpha, typename arrT::Scalar xc, typename arrT::Scalar yc)
 Create a 2-D Tukey window. More...
 
template<typename realT >
void mx::sigproc::window::tukey2dAnnulus (realT *filt, int rows, int cols, realT D, realT eps, realT alpha, realT xc, realT yc)
 Create a 2-D Tukey window on an annulus. More...
 
template<typename arrT >
void mx::sigproc::window::tukey2dAnnulus (arrT &filt, typename arrT::Scalar D, typename arrT::Scalar eps, typename arrT::Scalar alpha, typename arrT::Scalar xc, typename arrT::Scalar yc)
 Create a 2-D Tukey window on an annulus. More...
 

Function Documentation

◆ tukey2d() [1/2]

template<typename arrT >
void mx::sigproc::window::tukey2d ( arrT &  filt,
typename arrT::Scalar  D,
typename arrT::Scalar  alpha,
typename arrT::Scalar  xc,
typename arrT::Scalar  yc 
)

Create a 2-D Tukey window.

Function to create a 2-D Tukey window.

The shape of the window is controlled by alpha. alpha = 0 is a cylinder, alpha=1.0 is the Hann window.

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

Template Parameters
arrTan Eigen-like array type

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

Parameters
filt[in.out] a pre-allocated array
[in]Dthe diameter of the window
[in]alphacontrols the window shape. 1.0 gives a Hann window, 0.0 gives a cylinder (a.k.a. no window)
[in]xcthe desired x center of the window.
[in]ycthe desired y center of the window.

Definition at line 424 of file signalWindows.hpp.

◆ tukey2d() [2/2]

template<typename realT >
void mx::sigproc::window::tukey2d ( realT *  filt,
int  rows,
int  cols,
realT  D,
realT  alpha,
realT  xc,
realT  yc 
)

Create a 2-D Tukey window.

Function to create a 2-D Tukey window.

The shape of the window is controlled by alpha. alpha = 0 is a cylinder, alpha=1.0 is the Hann window.

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

Parameters
[out]filta pre-allocated array of size rows x cols (column major)
[in]rowsthe number of rows in filt
[in]colsthe number of cols in filt
[in]Dthe diameter of the window
[in]alphacontrols the window shape. 1.0 gives a Hann window, 0.0 gives a cylinder (a.k.a. no window)
[in]xcthe desired x center of the window.
[in]ycthe desired y center of the window.

Definition at line 363 of file signalWindows.hpp.

References mx::math::pi().

◆ tukey2dAnnulus() [1/2]

template<typename arrT >
void mx::sigproc::window::tukey2dAnnulus ( arrT &  filt,
typename arrT::Scalar  D,
typename arrT::Scalar  eps,
typename arrT::Scalar  alpha,
typename arrT::Scalar  xc,
typename arrT::Scalar  yc 
)

Create a 2-D Tukey window on an annulus.

Function to create a 2-D Tukey window on an annulus.

The shape of the window is controlled by alpha. alpha = 0 is a cylinder, 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
realTis a floating point type
Parameters
[in,out]filta pre-allocated array
[in]Dthe outer diameter of the window
[in]epsthe ratio of inner diameter to the outer diameter
[in]alphacontrols the window shape. 1.0 gives a Hann window, 0.0 gives a cylinder (a.k.a. no window)
[in]xcthe desired x center of the window.
[in]ycthe desired y center of the window.

Definition at line 512 of file signalWindows.hpp.

◆ tukey2dAnnulus() [2/2]

template<typename realT >
void mx::sigproc::window::tukey2dAnnulus ( realT *  filt,
int  rows,
int  cols,
realT  D,
realT  eps,
realT  alpha,
realT  xc,
realT  yc 
)

Create a 2-D Tukey window on an annulus.

Function to create a 2-D Tukey window on an annulus.

The shape of the window is controlled by alpha. alpha = 0 is a cylinder, alpha=1.0 is the Hann window.

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

Template Parameters
realTis a floating point type
Parameters
[out]filta pre-allocated array of size rows x cols (column major)
[in]rowsthe number of rows in filt
[in]colsthe number of cols in filt
[in]Dthe outer diameter of the window
[in]epsthe ratio of inner diameter to the outer diameter
[in]alphacontrols the window shape. 1.0 gives a Hann window, 0.0 gives a cylinder (a.k.a. no window)
[in]xcthe desired x center of the window.
[in]ycthe desired y center of the window.

Definition at line 447 of file signalWindows.hpp.

References mx::math::pi().