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

Utilities for working with the Airy Pattern.

Functions

template<typename realT >
realT mx::math::func::airyPattern (realT x)
 The classical Airy pattern. More...
 
template<typename realT >
realT mx::math::func::airyPattern (realT x, realT eps)
 The centrally obscured Airy pattern. More...
 
template<typename realT >
realT mx::math::func::airyPattern (realT x, realT y, realT A0, realT A, realT x0, realT y0, realT ps, realT eps)
 The general centrally obscured Airy pattern, with arbitrary center and platescale. More...
 
template<typename realT >
void mx::math::func::airyPattern2D (realT *arr, size_t nx, size_t ny, const realT A0, const realT A, const realT x0, const realT y0, realT ps)
 Fill in an array with the 2D arbitrarily-centered classical Airy pattern. More...
 
template<typename realT >
realT mx::math::func::seeingHalo (realT x, realT fwhm)
 Seeing Halo Profile. More...
 
template<typename realT >
realT mx::math::func::airyPatternEnclosed (realT x)
 Calculate the fraction of enclosed power at a given radius for the unobscured Airy Pattern. More...
 
template<typename realT >
realT mx::math::func::airyPatternEnclosed (realT x, realT eps)
 Calculate the fraction of enclosed power at a given radius for the centrally obscured Airy Pattern. More...
 

Function Documentation

◆ airyPattern() [1/3]

template<typename realT >
realT mx::math::func::airyPattern ( realT  x)

The classical Airy pattern.

Returns the intensity distribution of the Airy pattern at a given \( \lambda/D \)

References: [1], [12], https://en.wikipedia.org/wiki/Airy_disk.

Template Parameters
realTis the floating point type used for arithmetic.
Parameters
[in]xis the separation in units of \( \lambda/D \).

Definition at line 59 of file airyPattern.hpp.

References mx::math::func::jinc().

◆ airyPattern() [2/3]

template<typename realT >
realT mx::math::func::airyPattern ( realT  x,
realT  eps 
)

The centrally obscured Airy pattern.

Returns the intensity distribution of the centrally obscured Airy pattern at a given \( \lambda/D \)

References: [1], [12], https://en.wikipedia.org/wiki/Airy_disk.

Template Parameters
realTis the floating point type used for arithmetic.
Parameters
[in]xis the separation in units of \( \lambda/D \).
[in]epsis the ratio of the circular central obscuration diameter to the diameter.

Definition at line 75 of file airyPattern.hpp.

References mx::math::func::jinc().

◆ airyPattern() [3/3]

template<typename realT >
realT mx::math::func::airyPattern ( realT  x,
realT  y,
realT  A0,
realT  A,
realT  x0,
realT  y0,
realT  ps,
realT  eps 
)

The general centrally obscured Airy pattern, with arbitrary center and platescale.

Returns the intensity distribution of the centrally obscured Airy pattern at a given \( \lambda/D \). This version allows for an arbitrary center, scaling, and platescale.

References: [1], [12], https://en.wikipedia.org/wiki/Airy_disk.

Template Parameters
realTis the floating point type used for arithmetic.
Parameters
[in]xis the x-coordinate in units of pixels
[in]yis the y-coordinate in units of pixels
[in]A0constant value added to the Airy pattern
[in]Apeak scale of the Airy pattern.
[in]x0is the x-center in units of pixels
[in]y0is the y-center in units of pixels
[in]psthe platescale in \( (\lambda/D)/pixel \)
[in]epsis the ratio of the circular central obscuration diameter to the diameter.

Definition at line 95 of file airyPattern.hpp.

Referenced by mx::math::func::airyPattern2D().

◆ airyPattern2D()

template<typename realT >
void mx::math::func::airyPattern2D ( realT *  arr,
size_t  nx,
size_t  ny,
const realT  A0,
const realT  A,
const realT  x0,
const realT  y0,
realT  ps 
)

Fill in an array with the 2D arbitrarily-centered classical Airy pattern.

At each pixel (x,y) of the array this computes:

\( f(x,y) = A_0 + A\times Airy(\sqrt(x^2+y^2) \)

Template Parameters
realTis the type to use for arithmetic
Parameters
[out]arris the allocated array to fill in
[in]nxis the size of the x dimension of the array (rows)
[in]nyis the size of the y dimension of the array (columns)
[in]A0is the constant to add to the Gaussian
[in]Ais the scaling factor (peak height = A-A0)
[in]x0is the x-coordinate of the center
[in]y0is the y-coordinate of the center
[in]psthe platescale in \( (\lambda/D)/pixel \)

Definition at line 121 of file airyPattern.hpp.

References mx::math::func::airyPattern().

◆ airyPatternEnclosed() [1/2]

template<typename realT >
realT mx::math::func::airyPatternEnclosed ( realT  x)

Calculate the fraction of enclosed power at a given radius for the unobscured Airy Pattern.

See Mahajan (1986) [12] and https://en.wikipedia.org/wiki/Airy_disk.

Returns
the fraction of enclosed power at radius x
Parameters
[in]xthe radius

Definition at line 172 of file airyPattern.hpp.

◆ airyPatternEnclosed() [2/2]

template<typename realT >
realT mx::math::func::airyPatternEnclosed ( realT  x,
realT  eps 
)

Calculate the fraction of enclosed power at a given radius for the centrally obscured Airy Pattern.

See Mahajan (1986) [12] and https://en.wikipedia.org/wiki/Airy_disk. If eps = 0, this calls the unobscured version.

Returns
the fraction of enclosed power at radius x
Parameters
[in]xthe radius
[in]epsthe central obscuration fraction

Definition at line 207 of file airyPattern.hpp.

◆ seeingHalo()

template<typename realT >
realT mx::math::func::seeingHalo ( realT  x,
realT  fwhm 
)

Seeing Halo Profile.

A Moffat profile due to Roddier (1981)[21], see also Racine et al (1999)[20], which can be used to describe the seeing limited point-spread function of a telescope imaging through turbulence, or the halo in partially corrected imaging.

Returns
the value of the profile at x, in units of fractional flux per unit area.
Parameters
[in]xthe separation in the same units as fwhm.
[in]fwhmthe fwhm in arbitrary units. Note that this defines the area units of the density.

Definition at line 156 of file airyPattern.hpp.