mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
mx::AO::analysis::zernikeCovariance< realT, aosysT > Struct Template Reference

template<typename realT, typename aosysT>
struct mx::AO::analysis::zernikeCovariance< realT, aosysT >

Structure to manage the zernike mode covariance calculation, passed to integration functions.

Template Parameters
realTa floating point type used for all calculations. As of Dec 2023 must be double due to gsl_integration.
aosysTthe type of the AO system structure

Definition at line 45 of file zernikeCovariance.hpp.

#include <ao/analysis/zernikeCovariance.hpp>

Public Member Functions

 zernikeCovariance ()
 Constructor.
 
 ~zernikeCovariance ()
 Destructor.
 
realT getCovariance (realT &error)
 Calculate the covariance between the two modes.
 

Static Public Member Functions

static realT kInt (realT k, void *params)
 Worker function for the radial integral in the covariance calculation.
 
static realT phiInt (realT phi, void *params)
 Worker for the azimuthal integral (in phi) for the zernike mode covariance.
 

Public Attributes

aosysT * m_aosys { nullptr }
 Pointer to an AO system, which contains the relevant spatial PSD of turbulence.
 
realT m_n
 The n-index of the unprimed mode.
 
realT m_m
 The m-index of the unprimed mode.
 
realT m_np
 The n-indexof the primed mode, corresponding to the \( k_v = n/D \) component of spatial frequency.
 
realT m_mp
 The m-index of the primed mode, corresponding to the \( k_u = m/D \) component of spatial frequency.
 
realT m_k
 Spatial frequency being calculated, passed for use in the integrand worker functions.
 
realT m_kIntEpsAbs { 1e-10 }
 Absolute tolerance for the radial integral. Default is 1e-10.
 
realT m_kIntEpsRel { 0 }
 Relative tolerance for the radial integral. Default is 0, meaning absolute is used.
 
realT m_phiIntEpsAbs { 1e-10 }
 Absolute tolerance for the azimuthal integral. Default is 1e-10.
 
realT m_phiIntEpsRel { 0 }
 Relative tolerance for the azimuthal integral. Default is 0, meaning absolute is used.
 

Protected Attributes

gsl_integration_workspace * m_workspacePhi { nullptr }
 Working memory for the azimuthal integral.
 
gsl_integration_workspace * m_workspaceK { nullptr }
 Working memory for the radial integral.
 

Constructor & Destructor Documentation

◆ zernikeCovariance()

template<typename realT , typename aosysT >
mx::AO::analysis::zernikeCovariance< realT, aosysT >::zernikeCovariance ( )
inline

◆ ~zernikeCovariance()

Member Function Documentation

◆ getCovariance()

◆ kInt()

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::kInt ( realT  k,
void *  params 
)
static

Worker function for the radial integral in the covariance calculation.

Returns
the value of the integrand at spatial frequency k.
Parameters
[in]kthe spatial frequency at which to evaluate the integrand, meters
[in]paramsa pointer to a object of type zernikeCovariance<realT, aosyT>

Definition at line 164 of file zernikeCovariance.hpp.

References mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_k, mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_phiIntEpsAbs, and mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_phiIntEpsRel.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::getCovariance().

◆ phiInt()

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt ( realT  phi,
void *  params 
)
static

Worker for the azimuthal integral (in phi) for the zernike mode covariance.

Returns
the value of the integrand at the angle phi
Parameters
[in]phithe angle at which to evaluate the integrand, radians
[in]paramsa pointer to a object of type zernikeCovariance<realT, aosyT>

Definition at line 193 of file zernikeCovariance.hpp.

References mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_aosys, mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_k, mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_m, mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_mp, mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_n, and mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_np.

Member Data Documentation

◆ m_aosys

template<typename realT , typename aosysT >
aosysT* mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_aosys { nullptr }

Pointer to an AO system, which contains the relevant spatial PSD of turbulence.

Definition at line 48 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::getCovariance(), and mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_k

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_k

Spatial frequency being calculated, passed for use in the integrand worker functions.

Definition at line 63 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::kInt(), and mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_kIntEpsAbs

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_kIntEpsAbs { 1e-10 }

Absolute tolerance for the radial integral. Default is 1e-10.

Definition at line 66 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::getCovariance().

◆ m_kIntEpsRel

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_kIntEpsRel { 0 }

Relative tolerance for the radial integral. Default is 0, meaning absolute is used.

Definition at line 69 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::getCovariance().

◆ m_m

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_m

The m-index of the unprimed mode.

Definition at line 54 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_mp

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_mp

The m-index of the primed mode, corresponding to the \( k_u = m/D \) component of spatial frequency.

Definition at line 60 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_n

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_n

The n-index of the unprimed mode.

Definition at line 51 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_np

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_np

The n-indexof the primed mode, corresponding to the \( k_v = n/D \) component of spatial frequency.

Definition at line 57 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::phiInt().

◆ m_phiIntEpsAbs

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_phiIntEpsAbs { 1e-10 }

Absolute tolerance for the azimuthal integral. Default is 1e-10.

Definition at line 72 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::kInt().

◆ m_phiIntEpsRel

template<typename realT , typename aosysT >
realT mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_phiIntEpsRel { 0 }

Relative tolerance for the azimuthal integral. Default is 0, meaning absolute is used.

Definition at line 75 of file zernikeCovariance.hpp.

Referenced by mx::AO::analysis::zernikeCovariance< realT, aosysT >::kInt().

◆ m_workspaceK

template<typename realT , typename aosysT >
gsl_integration_workspace* mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_workspaceK { nullptr }
protected

◆ m_workspacePhi

template<typename realT , typename aosysT >
gsl_integration_workspace* mx::AO::analysis::zernikeCovariance< realT, aosysT >::m_workspacePhi { nullptr }
protected

The documentation for this struct was generated from the following file: