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... | |
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.
realT | is the floating point type used for arithmetic. |
[in] | x | is the separation in units of \( \lambda/D \). |
Definition at line 59 of file airyPattern.hpp.
References mx::math::func::jinc().
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.
realT | is the floating point type used for arithmetic. |
[in] | x | is the separation in units of \( \lambda/D \). |
[in] | eps | is the ratio of the circular central obscuration diameter to the diameter. |
Definition at line 75 of file airyPattern.hpp.
References mx::math::func::jinc().
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.
realT | is the floating point type used for arithmetic. |
[in] | x | is the x-coordinate in units of pixels |
[in] | y | is the y-coordinate in units of pixels |
[in] | A0 | constant value added to the Airy pattern |
[in] | A | peak scale of the Airy pattern. |
[in] | x0 | is the x-center in units of pixels |
[in] | y0 | is the y-center in units of pixels |
[in] | ps | the platescale in \( (\lambda/D)/pixel \) |
[in] | eps | is 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().
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) \)
realT | is the type to use for arithmetic |
[out] | arr | is the allocated array to fill in |
[in] | nx | is the size of the x dimension of the array (rows) |
[in] | ny | is the size of the y dimension of the array (columns) |
[in] | A0 | is the constant to add to the Gaussian |
[in] | A | is the scaling factor (peak height = A-A0) |
[in] | x0 | is the x-coordinate of the center |
[in] | y0 | is the y-coordinate of the center |
[in] | ps | the platescale in \( (\lambda/D)/pixel \) |
Definition at line 121 of file airyPattern.hpp.
References mx::math::func::airyPattern().
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.
[in] | x | the radius |
Definition at line 172 of file airyPattern.hpp.
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.
[in] | x | the radius |
[in] | eps | the central obscuration fraction |
Definition at line 207 of file airyPattern.hpp.
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.
[in] | x | the separation in the same units as fwhm. |
[in] | fwhm | the fwhm in arbitrary units. Note that this defines the area units of the density. |
Definition at line 156 of file airyPattern.hpp.