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

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.

#include <gsl/gsl_integration.h>
#include <gsl/gsl_errno.h>
#include "../../math/constants.hpp"
#include "../../math/func/jinc.hpp"
#include "../../sigproc/fourierModes.hpp"
#include "../../ioutils/fits/fitsFile.hpp"
#include "../../improc/eigenImage.hpp"
#include "../../improc/eigenCube.hpp"
#include "../../mxlib.hpp"
#include "../../ipc/ompLoopWatcher.hpp"
#include "../../sys/timeUtils.hpp"
#include "../../math/eigenLapack.hpp"
#include "../../math/func/airyPattern.hpp"
#include "aoAtmosphere.hpp"
#include "aoPSDs.hpp"
#include "aoSystem.hpp"
#include "varmapToImage.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

namespace  mx
 The mxlib c++ namespace.

Macros

#define WSZ   100000
 The size of the gsl_integration workspaces.

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.
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.
template<typename realT, typename aosysT>
realT mx::AO::analysis::kInt (realT k, void *params)
 Worker function for the radial integral in the covariance calculation.
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.
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.
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)

Macro Definition Documentation

◆ WSZ

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 )

◆ 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 405 of file fourierCovariance.hpp.

References mx::math::func::airyPattern(), mx::math::two_pi(), and varmapToImage().

◆ 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 205 of file fourierCovariance.hpp.

References mx::error, mx::AO::analysis::fourierCovariance< realT, aosysT >::k, mx::AO::analysis::fourierCovariance< realT, aosysT >::phi_w, phiInt_basic(), mx::math::two_pi(), mx::AO::analysis::fourierCovariance< realT, aosysT >::useBasic, and WSZ.

◆ phiInt_mod()

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.

Parameters
phithe angle 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
aosysTthe type of the AO system structure

Definition at line 127 of file fourierCovariance.hpp.

References mx::AO::analysis::fourierCovariance< realT, aosysT >::aosys, mx::math::func::jinc(), mx::AO::analysis::fourierCovariance< realT, aosysT >::k, mx::AO::analysis::fourierCovariance< realT, aosysT >::m, mx::AO::analysis::fourierCovariance< realT, aosysT >::mnCon, mx::AO::analysis::fourierCovariance< realT, aosysT >::mp, mx::AO::analysis::fourierCovariance< realT, aosysT >::n, mx::AO::analysis::fourierCovariance< realT, aosysT >::np, mx::AO::analysis::fourierCovariance< realT, aosysT >::p, mx::math::pi(), and mx::AO::analysis::fourierCovariance< realT, aosysT >::pp.