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

Calculation of the modal covariance in the Fourier basis. More...

Calculation of the modal covariance in the Fourier basis.

Author
Jared R. Males (jared.nosp@m.male.nosp@m.s@gma.nosp@m.il.c.nosp@m.om)

Definition in file fourierCovariance.hpp.

Go to the source code of this file.

Classes

struct  mx::AO::analysis::fourierCovariance< realT, aosysT >
 Structure to manage the Fourier mode covariance calculation, passed to integration functions. More...
 

Namespaces

 mx
 The mxlib c++ namespace.
 

Functions

template<typename realT , typename aosysT >
realT mx::AO::analysis::phiInt_basic (realT phi, void *params)
 Worker for the azimuthal integral (in phi) for the basic Fourier mode covariance. More...
 
template<typename realT , typename aosysT >
realT mx::AO::analysis::phiInt_mod (realT phi, void *params)
 Worker for the azimuthal integral (in phi) for the modified Fourier mode covariance. More...
 
template<typename realT , typename aosysT >
realT mx::AO::analysis::kInt (realT k, void *params)
 Worker function for the radial integral in the covariance calculation. More...
 
template<typename realT , typename aosysT >
int mx::AO::analysis::fourierVarVec (const std::string &fname, int N, aosysT &aosys, realT absTol, realT relTol, bool modifed=true)
 Calculate a vector of Fourier mode variances. More...
 
template<typename realT , typename aosysT >
int mx::AO::analysis::fourierPSDMap (improc::eigenImage< realT > &var, improc::eigenImage< realT > &psd, int N, int overSample, aosysT &aosys)
 Calculate a map of Fourier variances by convolution with the PSD. More...
 
template<typename realT >
int mx::AO::analysis::fourierCovarMap (const std::string &fname, int N, realT D, realT L_0, bool subPist, bool subTilt, realT absTol, realT relTol, bool modified=true)
 

Function Documentation

◆ fourierCovarMap()

template<typename realT >
int mx::AO::analysis::fourierCovarMap ( const std::string &  fname,
int  N,
realT  D,
realT  L_0,
bool  subPist,
bool  subTilt,
realT  absTol,
realT  relTol,
bool  modified = true 
)
Parameters
[out]fnamethe path where the output FITS file will be written
[in]Nthe linear number of Fourier modes across the aperture. The Nyquist frequency is set by N/2.

Definition at line 476 of file fourierCovariance.hpp.

References mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::D(), mx::AO::analysis::fourierCovarMap(), mx::AO::analysis::aoAtmosphere< _realT >::L_0(), mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::loadMagAOX(), and mx::AO::analysis::aoAtmosphere< _realT >::r_0().

Referenced by mx::AO::analysis::fourierCovarMap().

◆ fourierPSDMap()

template<typename realT , typename aosysT >
int mx::AO::analysis::fourierPSDMap ( improc::eigenImage< realT > &  var,
improc::eigenImage< realT > &  psd,
int  N,
int  overSample,
aosysT &  aosys 
)

Calculate a map of Fourier variances by convolution with the PSD.

Uses the Airy pattern for the circularly unobstructed aperture.

Returns
0 on success
-1 on error
Parameters
[out]varThe variance estimated by convolution with the PSD
[out]psdthe PSD map
[in]Nthe number of components to analyze
aosys[in[ the AO system defining the PSD characteristics.

Definition at line 420 of file fourierCovariance.hpp.

References mx::AO::analysis::fourierPSDMap(), and mx::astro::constants::k().

Referenced by mx::AO::analysis::fourierPSDMap().

◆ fourierVarVec()

◆ kInt()

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

Worker function for the radial integral in the covariance calculation.

Parameters
kthe spatial frequency at which to evaluate the integrand
paramsa pointer to a object of type fourierCovariance<realT, aosyT>
Template Parameters
realTa floating point type used for all calculations. As of Nov 2016 must be double due to gsl_integration.
aosysTthe type of the AO system structure

Definition at line 215 of file fourierCovariance.hpp.

References mx::AO::analysis::fourierCovariance< realT, aosysT >::k, mx::astro::constants::k(), mx::AO::analysis::kInt(), mx::AO::analysis::fourierCovariance< realT, aosysT >::phi_w, and mx::AO::analysis::fourierCovariance< realT, aosysT >::useBasic.

Referenced by mx::AO::analysis::kInt().

◆ phiInt_mod()

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