mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
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.
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.
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.
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.
template<typename realT>
void mx::sigproc::window::tukey2dSquare (realT *filt, int rows, int cols, realT W, realT H, realT alpha, realT xc, realT yc)
 Create a 2-D Tukey window on a rectangle.

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 427 of file signalWindows.hpp.

References tukey2d().

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

Referenced by mx::AO::circularApodizedPupil(), and tukey2d().

◆ 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 519 of file signalWindows.hpp.

References tukey2dAnnulus().

◆ 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 451 of file signalWindows.hpp.

References mx::math::pi().

Referenced by mx::AO::circularApodizedPupil(), and tukey2dAnnulus().

◆ tukey2dSquare()

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

Create a 2-D Tukey window on a rectangle.

Function to create a 2-D Tukey window on a rectangle.

The shape of the window is controlled by alpha. alpha = 0 is a rectangle window, 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]Wthe width of the window, corresponds to rows
[in]Hthe height of the window, corresponds to cols
[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 542 of file signalWindows.hpp.

References mx::math::pi().

Referenced by TEST_CASE().