mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT > Class Template Reference

template<typename _realT, class _inputSpectT, typename iosT = std::ostream>
class mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >

Describes an analytic adaptive optics (AO) system.

Templatized by the turbulence power spectral density (PSD).

Template Parameters
realTthe floating point type used for all calculations
inputSpecTspecifies the turbulence spatial PSD type
iosTis an output stream type with operator << defined (default is std::ostream)

Definition at line 67 of file aoSystem.hpp.

#include <ao/analysis/aoSystem.hpp>

Public Member Functions

 aoSystem ()
 Default c'tor. More...
 
 ~aoSystem ()
 Destructor. More...
 
void loadGuyon2005 ()
 Load the default parameters from Guyon, 2005 [9]. More...
 
void loadMagAOX ()
 Load parameters corresponding to the MagAO-X system. More...
 
void loadGMagAOX ()
 Load parameters corresponding to the G-MagAO-X system. More...
 
void D (realT nD)
 Set the value of the primary mirror diameter. More...
 
realT D ()
 Get the value of the primary mirror diamter. More...
 
void d_min (const std::vector< realT > &nd)
 Set the minimum subaperture sampling for each WFS mode. More...
 
void d_min (int idx, realT nd)
 Set the minimum subaperture sampling for a given WFS mode. More...
 
realT d_min (size_t idx)
 Get the minimum subaperture sampling for a given WFS mode. More...
 
std::vector< realT > d_min ()
 Get the minimum subaperture sampling for all WFS modes. More...
 
void optd (bool od)
 Set whether or not the value of d is optimized or just set to m_d_min. More...
 
bool optd ()
 Get the value of m_optd. More...
 
void optd_delta (realT odd)
 Set the fractional change in actuator spacing for optimization. More...
 
realT optd_delta ()
 Get the value of the fractional change in actuator spacing for optimization.. More...
 
template<typename wfsT >
void wfsBeta (const wfsT &w)
 Set the WFS Beta pointer. More...
 
template<typename wfsT >
void wfsBeta (const wfsT *w)
 Set the WFS Beta pointer. More...
 
wfs< realT, iosT > * wfsBeta ()
 Get the WFS Beta pointer. More...
 
realT beta_p (realT m, realT n)
 Get the value of beta_p for a spatial frequency. More...
 
realT beta_r (realT m, realT n)
 Get the value of beta_r for a spatial frequency. More...
 
void lam_wfs (realT nlam)
 Set the value of the WFS wavelength. More...
 
realT lam_wfs ()
 Get the value of the WFS wavelength. More...
 
void npix_wfs (const std::vector< realT > &npix)
 Set the number of pixels in the WFS for each WFS mode. More...
 
void npix_wfs (int idx, realT npix)
 Set the number of pixels in the WFS for a given WFS mode. More...
 
realT npix_wfs (size_t idx)
 Get the number of pixels in the WFS for a given WFS mode. More...
 
std::vector< realT > npix_wfs ()
 Get the number of pixels in the WFS for all WFS modes. More...
 
void ron_wfs (const std::vector< realT > &nron)
 Set the value of the WFS readout noise for each WFS mode. More...
 
void ron_wfs (int idx, realT nron)
 Set the value of the WFS readout noise for a given bining mode. More...
 
realT ron_wfs (size_t idx)
 Get the value of the WFS readout noise for a given WFS mode. More...
 
std::vector< realT > ron_wfs ()
 Get the value of the WFS readout noise for all WFS modes. More...
 
void Fbg (const std::vector< realT > &fbg)
 Set the value of the background fluxes. More...
 
void Fbg (int idx, realT fbg)
 Set a single value of the background flux for a given WFS mode. More...
 
realT Fbg (size_t idx)
 Get the value of the background flux for a given WFS mode. More...
 
std::vector< realT > Fbg ()
 Get the value of the background flux for all WFS modes. More...
 
void minTauWFS (const std::vector< realT > &ntau)
 Set the value of the minimum WFS exposure times. More...
 
void minTauWFS (size_t idx, realT ntau)
 Set a single value of the minimum WFS exposure time for a given WFS mode. More...
 
realT minTauWFS (size_t idx)
 Get the value of the minimum WFS exposure time for a given binning. More...
 
std::vector< realT > minTauWFS ()
 Get the values of the minimum WFS exposure time. More...
 
void bin_npix (bool bnp)
 Set the value of the pixel binning flag. More...
 
bool bin_npix ()
 Get the value of the pixel binngin flag. More...
 
int bin_opt ()
 Get the value of the optimum binning factor/index. More...
 
void tauWFS (realT ntau)
 Set the value of the WFS exposure time. More...
 
realT tauWFS ()
 Get the value of the minimum WFS exposure time. More...
 
void deltaTau (realT ndel)
 Set the value of m_deltaTau. More...
 
realT deltaTau ()
 Get the value of m_deltaTau. More...
 
void optTau (bool ot)
 Set the value of m_optTau. More...
 
bool optTau ()
 Get the value of m_optTau. More...
 
void lam_sci (realT nlam)
 Set the science wavelength. More...
 
realT lam_sci ()
 Get the science wavelength. More...
 
void zeta (realT nz)
 Set the zenith angle, and its secant. More...
 
realT zeta ()
 Get the zenith angle. More...
 
realT secZeta ()
 Get the zecant of the zenith angle. More...
 
void fit_mn_max (int mnm)
 Set the value of m_fit_mn_max. More...
 
int fit_mn_max ()
 Get the value of m_fit_mn_max. More...
 
void circularLimit (bool cl)
 Set the value of the circularLimit flag. More...
 
bool circularLimit ()
 Get the value of the circularLimit flag. More...
 
void spatialFilter_ku (realT ku)
 Set the value of spatialFilter_ku. More...
 
realT spatialFilter_ku ()
 Get the value of spatialFilter_ku. More...
 
void spatialFilter_kv (realT kv)
 Set the value of spatialFilter_kv. More...
 
realT spatialFilter_kv ()
 Get the value of spatialFilter_kv. More...
 
void ncp_wfe (realT nwfe)
 Set the value of the non-common path WFE. More...
 
realT ncp_wfe ()
 Get the value of the non-common path WFE. More...
 
void ncp_alpha (realT alpha)
 Set the value of the non-common path WFE PSD index. More...
 
realT ncp_alpha ()
 Get the value of the non-common path WFE PSD index. More...
 
void F0 (realT nF0)
 Set the value of the 0 magnitude photon rate. More...
 
realT F0 ()
 Get the value of the 0 magnitude photon rate. More...
 
void starMag (realT nmag)
 Set the value of the Star's magnitude. More...
 
realT starMag ()
 Get the value of the Star's magnitude. More...
 
realT Fg (realT mag)
 The photon flux at a given star magnitude. More...
 
realT Fg ()
 Get the photon rate at the current Star magnitude. More...
 
const Eigen::Array< bool, -1, -1 > & controlledModes ()
 Access the array of controlledModes. More...
 
realT ncpError (int m, int n)
 Calculate the NCP variance at a spatial frequency. More...
 
realT ncpError ()
 Calculate the total NCP variance in rad^2. More...
 
iosT & dumpAOSystem (iosT &ios)
 Output current parameters to a stream. More...
 
void setupConfig (app::appConfigurator &config)
 Setup the configurator to configure this class. More...
 
void loadConfig (app::appConfigurator &config)
 Load the configuration of this class from a configurator. More...
 
Measurement Error

Calculating the WFE due to WFS measurement noise.

realT signal2Noise2 (realT &Nph, realT tau_wfs, realT d, int b)
 Calculate the terms of the signal to noise ratio squared (S/N)^2 for the WFS measurement. More...
 
realT measurementError (realT m, realT n, realT d, int b)
 Calculate the measurement noise at a spatial frequency and specified actuator spacing. More...
 
realT measurementErrorTotal ()
 Calculate the total measurement error over all corrected spatial frequencies. More...
 
Time Delay Error

Calculating the WFE due to time delay.

realT timeDelayError (realT m, realT n, realT d, int b)
 Calculate the time delay at a spatial frequency at the optimum exposure time and the specified actuator spacing. More...
 
realT timeDelayErrorTotal ()
 Calculate the time delay error over all corrected spatial frequencies. More...
 
Fitting Error

Calculating the WFE due to uncorrected spatial frequencies.

realT fittingError (realT m, realT n)
 Calculate the fitting error at a specific spatial frequency.
More...
 
realT fittingErrorTotal ()
 Calculate the total fitting error over all uncorrected spatial frequencies. More...
 
Chromatic Errors

Calculating the WFE due to chromaticity in scintillaion, index of refraction, and dispersion.

realT chromScintOPDError (int m, int n)
 Calculate the wavefront error due to scintillation chromaticity in the OPD at a spatial frequency. More...
 
realT chromScintOPDErrorTotal ()
 Calculate the wavefront error due to scintillation chromaticity in the OPD over all spatial frequencies.
More...
 
realT chromScintAmpError (int m, int n)
 Calculate the wavefront error due to scintillation chromaticity in amplitude for a given spatial frequency. More...
 
realT chromScintAmpError ()
 Calculate the wavefront error due to scintillation chromaticity in amplitude over all spatial frequencies.
More...
 
realT chromIndexError (int m, int n)
 Calculate the wavefront error due to chromaticity in the index of refraction at a given spatial frequency. More...
 
realT chromIndexErrorTotal ()
 Calculate the wavefront error due to chromaticity in the index of refraction at a specific spatial frequency. More...
 
realT dispAnisoOPDError (int m, int n)
 Calculate the wavefront error due to dispersive anisoplanatism in the OPD at a given spatial frequency. More...
 
realT dispAnisoOPDErrorTotal ()
 Calculate the wavefront error due to dispersive anisoplanatism in the OPD over all specific spatial frequencies.
More...
 
realT dispAnisoAmpError ()
 Calculate the wavefront error due to dispersive anisoplanatism in the amplitude at a specific spatial frequency.
More...
 
Optimum Parameters

Functions to calculate the optimum integration time and actuator spacing.

realT optimumTauWFS (realT m, realT n, realT d, int b)
 Calculate the optimum exposure time for a given spatial frequency at a specified actuator spacing. More...
 
realT optimumTauWFS (realT m, realT n)
 Calculate the optimum exposure time for a given spatial frequency at the optimum actuator spacing. More...
 
realT d_opt ()
 Calculate the optimum actuator spacing. More...
 
Contrast

Calculating contrast

template<typename varFuncT >
realT C_ (int m, int n, bool normStrehl, varFuncT varFunc, int doFittingError)
 Worker function for raw contrast fuctions. More...
 
template<typename imageT , typename CfuncT >
void C_Map (imageT &im, CfuncT Cfunc, bool normStrehl)
 Worker function for the contrast-map functions. More...
 
realT C0var (realT m, realT n)
 Calculate the residual variance due to uncorrected phase at a spatial frequency. More...
 
realT C0 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to uncorrected phase, C0. More...
 
template<typename imageT >
void C0Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C0. More...
 
realT C1var (realT m, realT n)
 Calculate the residual variance due to uncorrected amplitude at a spatial frequency. More...
 
realT C1 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to uncorrected amplitude, C1. More...
 
template<typename imageT >
void C1Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C1. More...
 
realT C2var (realT m, realT n)
 Calculate the residual variance due to measurement and time delay errors in phase/OPD at a spatial frequency. More...
 
realT C2 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to measurement and time delay errors in phase/OPD at a spatial frequency. More...
 
template<typename imageT >
void C2Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C2(). More...
 
realT C3var (realT m, realT n)
 Calculate the residual variance due to measurement and time delay errors in amplitude at a spatial frequency. More...
 
realT C3 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to measurement and time delay errors in amplitude at a spatial frequency. More...
 
template<typename imageT >
void C3Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C3. More...
 
realT C4var (realT m, realT n)
 Calculate the residual variance due to scintilation-OPD chromaticity. More...
 
realT C4 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to scintilation-OPD chromaticity. More...
 
template<typename imageT >
void C4Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C4. More...
 
realT C5var (realT m, realT n)
 Calculate the residual variance due to to scintilation-amplitude chromaticity. More...
 
realT C5 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to scintilation-amplitude chromaticity. More...
 
template<typename imageT >
void C5Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C5. More...
 
realT C6var (realT m, realT n)
 Calculate the residual variance due to chromaticity of the index of refraction of air. More...
 
realT C6 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to chromaticity of the index of refraction of air. More...
 
template<typename imageT >
void C6Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C6. More...
 
realT C7var (realT m, realT n)
 Calculate the residual variance due to dispersive anisoplanatism. More...
 
realT C7 (realT m, realT n, bool normStrehl=true)
 Calculate the contrast due to dispersive anisoplanatism. More...
 
template<typename imageT >
void C7Map (imageT &map, bool normStrehl)
 Calculate a 2D map of contrast C7. More...
 

Protected Attributes

realT m_D {0}
 Telescope diameter [m]. More...
 
std::vector< realT > m_d_min {0}
 Minimum AO system actuator pitch [m]. One per WFS mode. More...
 
realT m_d_opt {0}
 Current optimum AO system actuator pitch [m]. More...
 
bool m_optd {false}
 Flag controlling whether actuator pitch is optimized (true) or just uses m_d_min (false). Default: true. More...
 
realT m_optd_delta {1.0}
 The fractional change from d_min used in optimization. Set to 1 for integer binnings, > 1 for finer sampling. More...
 
wfs< realT, iosT > * m_wfsBeta {nullptr}
 The WFS beta_p class. More...
 
bool m_ownWfsBeta {false}
 Flag indicating if the WFS beta_p pointer is owned by this instance. More...
 
realT m_lam_wfs {0}
 WFS wavelength [m]. More...
 
std::vector< realT > m_npix_wfs {0}
 Number of WFS pixels. One per WFS mode. More...
 
std::vector< realT > m_ron_wfs {0}
 WFS readout noise [electrons/pix]. One per WFS mode. More...
 
std::vector< realT > m_Fbg {0}
 Background flux, [photons/sec/pixel]. One per WFS mode. More...
 
std::vector< realT > m_minTauWFS {0}
 Minimum WFS exposure time [sec]. One per WFS mode. More...
 
bool m_bin_npix {true}
 Flag controlling whether or not to bin WFS pixels according to the actuator spacing. More...
 
int m_bin_opt {0}
 The optimum binning factor. If WFS modes are used, this is the mode index (0 to N-1). If not, it is 1 minus the pixel binning factor. It is always 1 minus the actuator binning factor. More...
 
realT m_tauWFS {0}
 Actual WFS exposure time [sec]. More...
 
realT m_deltaTau {0}
 Loop latency [sec]. More...
 
bool m_optTau {true}
 Flag controlling whether optimum integration time is calculated (true) enforcing m_minTauWFS, or if m_tauWFS is used (false). Default: true. More...
 
realT m_lam_sci {0}
 Science wavelength [m]. More...
 
realT m_zeta {0}
 Zenith angle [radians]. More...
 
realT m_secZeta {1}
 Secant of the Zenith angle (calculated) More...
 
int m_fit_mn_max {100}
 Maximum spatial frequency index to use for fitting error calculation. More...
 
bool m_circularLimit {false}
 Flag to indicate that the spatial frequency limit is circular, not square. More...
 
realT m_spatialFilter_ku {std::numeric_limits<realT>::max()}
 The spatial filter cutoff in u, [m^-1]. More...
 
realT m_spatialFilter_kv {std::numeric_limits<realT>::max()}
 The spatial filter cutoff in v, [m^-1]. More...
 
realT m_ncp_wfe {0}
 Static WFE [m rms]. More...
 
realT m_ncp_alpha {2}
 Power-law exponent for the NCP aberations. Default is 2. More...
 
realT m_F0 {0}
 0 mag flux from star at WFS [photons/sec] More...
 
realT m_starMag {0}
 The magnitude of the star. More...
 
bool m_specsChanged {true}
 Flag to indicate that a specification has changed. More...
 
bool m_dminChanged {true}
 Flag to indicate that d_min has changed. More...
 
Eigen::Array< bool,-1,-1 > m_controlledModes
 Map of which modes are under control. Set by calcStrehl. More...
 
realT m_wfeMeasurement {0}
 Total WFE due to measurement a error [rad^2 at m_lam_sci]. More...
 
realT m_wfeTimeDelay {0}
 Total WFE due to time delay [rad^2 at m_lam_sci]. More...
 
realT m_wfeFitting {0}
 Total WFE due to fitting error [rad^2 at m_lam_sci]. More...
 
realT m_wfeChromScintOPD {0}
 Total WFE due to the chromaticity of scintillation OPD [rad^2 at lam_sc]. More...
 
realT m_wfeChromIndex {0}
 Total WFE due to the chromaticity of the index of refraction [rad^2 at lam_Sci]. More...
 
realT m_wfeAnisoOPD {0}
 Total WFE due to dispersive anisoplanatism OPD. More...
 
realT m_wfeNCP {0}
 Total WFE due to NCP errors [rad^2 at m_lam_sci]. More...
 
realT m_wfeVar {0}
 The WFE variance, in meters^2. Never use this directly, instead use wfeVar(). More...
 
realT m_strehl {0}
 Strehl ratio, a calculated quantity. Never use this directdy, instead use strehl(). More...
 

Overall WFE and Strehl Ratio

Functions to calculate the total WFE and Strehl ratio.

realT wfeVar ()
 Get the current value of the total WFE variance. More...
 
realT strehl (realT d, int b)
 Get the Strehl ratio for a given actuator pitch and WFS WFS mode. More...
 
realT strehl ()
 Get the current Strehl ratio. More...
 
void calcStrehl ()
 Calculate the component WFE, total WFE, and Strehl ratio. More...
 

Constructor & Destructor Documentation

◆ aoSystem()

template<typename realT , class inputSpectT , typename iosT >
mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::aoSystem

Default c'tor.

Calls initialize().

Definition at line 1174 of file aoSystem.hpp.

◆ ~aoSystem()

template<typename realT , class inputSpectT , typename iosT >
mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::~aoSystem

Destructor.

Definition at line 1180 of file aoSystem.hpp.

Member Function Documentation

◆ beta_p()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::beta_p ( realT  m,
realT  n 
)

Get the value of beta_p for a spatial frequency.

beta_p is the photon noise sensitivity of the WFS.

Returns
beta_p as calculated by the WFS.
Parameters
[in]mthe spatial frequency index
[in]nthe spatial frequency index

Definition at line 1378 of file aoSystem.hpp.

◆ beta_r()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::beta_r ( realT  m,
realT  n 
)

Get the value of beta_r for a spatial frequency.

beta_r is the read noise sensitivity of the WFS.

Returns
beta_r as calculated by the WFS.
Parameters
[in]mthe spatial frequency index
[in]nthe spatial frequency index

Definition at line 1386 of file aoSystem.hpp.

◆ bin_npix() [1/2]

template<typename realT , class inputSpectT , typename iosT >
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::bin_npix

Get the value of the pixel binngin flag.

Returns

Definition at line 1605 of file aoSystem.hpp.

◆ bin_npix() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::bin_npix ( bool  bnp)

Set the value of the pixel binning flag.

Parameters
[in]bnpis the new value of m_bin_npix

Definition at line 1594 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ bin_opt()

template<typename realT , class inputSpectT , typename iosT >
int mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::bin_opt

Get the value of the optimum binning factor/index.

If WFS modes are used, this is the mode index (0 to N-1). If not, it is 1 minus the pixel binning factor. It is always 1 minus the actuator binning factor. This calls opt_d() to perform the optimization if needed.

Returns
the current value of m_bin_opt.

Definition at line 1611 of file aoSystem.hpp.

◆ C0()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C0 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to uncorrected phase, C0.

Contrast C0 is the uncorrected phase, with the effects of scintillation included. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Returns
C0.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio

Definition at line 2514 of file aoSystem.hpp.

◆ C0Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C0Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C0.

Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2525 of file aoSystem.hpp.

◆ C0var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C0var ( realT  m,
realT  n 
)

Calculate the residual variance due to uncorrected phase at a spatial frequency.

Used to calculate contrast C0().

Returns
variance at (m,n).
Todo:
handle multiple layers
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2504 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C1()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C1 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to uncorrected amplitude, C1.

Contrast C1 is the uncorrected amplitude due to scintillation. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C0.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio

Definition at line 2544 of file aoSystem.hpp.

◆ C1Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C1Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C1.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2554 of file aoSystem.hpp.

◆ C1var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C1var ( realT  m,
realT  n 
)

Calculate the residual variance due to uncorrected amplitude at a spatial frequency.

Used to calculate contrast C1().

Returns
variance at (m,n).
Todo:
handle multiple layers
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2533 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C2()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C2 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to measurement and time delay errors in phase/OPD at a spatial frequency.

Contrast C2 is just the total variance due to time delay and measurement errors, divided by the Strehl ratio. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C2.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2571 of file aoSystem.hpp.

◆ C2Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C2Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C2().

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2581 of file aoSystem.hpp.

◆ C2var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C2var ( realT  m,
realT  n 
)

Calculate the residual variance due to measurement and time delay errors in phase/OPD at a spatial frequency.

Used to calculate contrast C2().

Returns
variance at (m,n).
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2562 of file aoSystem.hpp.

◆ C3()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C3 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to measurement and time delay errors in amplitude at a spatial frequency.

Contrast C3 is just the total variance due to time delay and measurement errors, divided by the Strehl ratio. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C3.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2597 of file aoSystem.hpp.

◆ C3Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C3Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C3.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2607 of file aoSystem.hpp.

◆ C3var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C3var ( realT  m,
realT  n 
)

Calculate the residual variance due to measurement and time delay errors in amplitude at a spatial frequency.

Used to calculate contrast C3().

Returns
variance at (m,n).
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2589 of file aoSystem.hpp.

◆ C4()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C4 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to scintilation-OPD chromaticity.

Contrast C4 is due to the chromaticity of scintillation, causing the ODP measurement to be slightly incorrect at the science wavelength. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C4.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2628 of file aoSystem.hpp.

◆ C4Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C4Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C4.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2638 of file aoSystem.hpp.

◆ C4var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C4var ( realT  m,
realT  n 
)

Calculate the residual variance due to scintilation-OPD chromaticity.

Used to calculate contrast C4().

Returns
variance at (m,n).
Todo:
handle multiple layers
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2615 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C5()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C5 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to scintilation-amplitude chromaticity.

Contrast C5 is due to the chromaticity of scintillation, causing the amplitude measurement to be slightly incorrect at the science wavelength. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C4.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2659 of file aoSystem.hpp.

◆ C5Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C5Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C5.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2669 of file aoSystem.hpp.

◆ C5var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C5var ( realT  m,
realT  n 
)

Calculate the residual variance due to to scintilation-amplitude chromaticity.

Used to calculate contrast C5().

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Returns
variance at (m,n).
Todo:
handle multiple layers
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2646 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C6()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C6 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to chromaticity of the index of refraction of air.

Contrast C6 is due to the index of refraction of air being wavelength dependent, causing the ODP measurement to be slightly incorrect at the science wavelength. See Guyon (2005) [9], and the updated derivation in Males & Guyon (2018) [13].

Returns
C6.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2689 of file aoSystem.hpp.

◆ C6Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C6Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C6.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2699 of file aoSystem.hpp.

◆ C6var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C6var ( realT  m,
realT  n 
)

Calculate the residual variance due to chromaticity of the index of refraction of air.

Used to calculate contrast C6().

Returns
variance at (m,n).
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2677 of file aoSystem.hpp.

◆ C7()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C7 ( realT  m,
realT  n,
bool  normStrehl = true 
)

Calculate the contrast due to dispersive anisoplanatism.

Contrast C7 is due to atmospheric dispersion causing light at different wavelengths to take different paths through atmospheric turbulence. See Fitzgerald (2017, in prep) [fitzgerald_2017]

Returns
C7.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
normStrehlflag controls whether the contrast is normalized by Strehl ratio.

Definition at line 2718 of file aoSystem.hpp.

◆ C7Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C7Map ( imageT &  map,
bool  normStrehl 
)

Calculate a 2D map of contrast C7.

The contrast is Strehl-normalized here.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image type.
Parameters
[in]mapthe map image to be filled in with contrast

Definition at line 2728 of file aoSystem.hpp.

◆ C7var()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C7var ( realT  m,
realT  n 
)

Calculate the residual variance due to dispersive anisoplanatism.

Used to calculate contrast C7().

Returns
variance at (m,n).
Todo:
this needs to handle multiple layers – do we violate an assumption of L_0 isn't constant?
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2707 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C_()

template<typename realT , class inputSpectT , typename iosT >
template<typename varFuncT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C_ ( int  m,
int  n,
bool  normStrehl,
varFuncT  varFunc,
int  doFittingError 
)

Worker function for raw contrast fuctions.

The logic in this calculation is the same regardless of component, except for the calculation of variance. The varFunc function pointer is used to calculate the variance, otherwise This handles the other details such as Strehl normalization, fitting error (if appropriate), and bounds checking.

Note
this gives the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
varFuncTis a function-pointer-to-member (of this class) with signature realT(*f)(realT, realT)
Parameters
[in]mis the spatial frequency index in u/
[in]nis the spatial frequency index in v.
[in]normStrehlflag controls whether the contrast is normalized by Strehl ratio/
[in]varFuncthe variance function to use.
[in]doFittingErrorflag to describe how fitting error should be considered for this term: FITTING_ERROR_NO, FITTING_ERROR_ZERO, FITTING_ERROR_X, or FITTING_ERROR_Y.

Definition at line 2432 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ C_Map()

template<typename realT , class inputSpectT , typename iosT >
template<typename imageT , typename CfuncT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C_Map ( imageT &  im,
CfuncT  Cfunc,
bool  normStrehl 
)

Worker function for the contrast-map functions.

The map calculation is the same for all terms, except for the calculation of variance at each pixel. The Cfunc function pointer is used to actually get the contrast.

Note
this is the raw PSD, it must be convolved with the PSF for the true contrast.
Template Parameters
imageTis an Eigen-like image
CfuncTis a function-pointer-to-member (of this class) with signature realT (*f)(realT, realT, bool)
Parameters
[out]imthe map image to be filled in.
[in]Cfuncthe raw contrast function to use for filling in the map.
[in]normStrehlflag controlling whether or not the map is normalized by Strehl

Definition at line 2479 of file aoSystem.hpp.

◆ calcStrehl()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::calcStrehl
protected

Calculate the component WFE, total WFE, and Strehl ratio.

This should only be called when something changes.

Definition at line 2338 of file aoSystem.hpp.

◆ chromIndexError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::chromIndexError ( int  m,
int  n 
)

Calculate the wavefront error due to chromaticity in the index of refraction at a given spatial frequency.

This totals the WFE from chromaticity in the index of refraction.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency

Definition at line 1968 of file aoSystem.hpp.

◆ chromIndexErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::chromIndexErrorTotal

Calculate the wavefront error due to chromaticity in the index of refraction at a specific spatial frequency.

This totals the WFE from chromaticity in the index of refraction for the optimum actuator spacing.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).

Definition at line 1976 of file aoSystem.hpp.

◆ chromScintAmpError() [1/2]

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::chromScintAmpError ( )

Calculate the wavefront error due to scintillation chromaticity in amplitude over all spatial frequencies.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).

◆ chromScintAmpError() [2/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::chromScintAmpError ( int  m,
int  n 
)

Calculate the wavefront error due to scintillation chromaticity in amplitude for a given spatial frequency.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency

Definition at line 1942 of file aoSystem.hpp.

◆ chromScintOPDError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::chromScintOPDError ( int  m,
int  n 
)

Calculate the wavefront error due to scintillation chromaticity in the OPD at a spatial frequency.

This totals the WFE from scintillation chromaticity in the OPD.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency

Definition at line 1927 of file aoSystem.hpp.

◆ chromScintOPDErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::chromScintOPDErrorTotal

Calculate the wavefront error due to scintillation chromaticity in the OPD over all spatial frequencies.

This totals the WFE from scintillation chromaticity in the OPD for the optimum actuator spacing.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).

Definition at line 1935 of file aoSystem.hpp.

◆ circularLimit() [1/2]

template<typename realT , class inputSpectT , typename iosT >
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::circularLimit

Get the value of the circularLimit flag.

Returns
the current value of m_circularLimit

Definition at line 1718 of file aoSystem.hpp.

◆ circularLimit() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::circularLimit ( bool  cl)

Set the value of the circularLimit flag.

If this is true, then the spatial frequency limits are treated as a circle rather than a square. This will create a circular dark hole.

Parameters
[in]clthe new value of the circularLimit flag

Definition at line 1710 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ controlledModes()

template<typename realT , class inputSpectT , typename iosT >
const Eigen::Array< bool, -1, -1 > & mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::controlledModes

Access the array of controlledModes.

This array indicates which modes are controlled after optimizeStrehl chooses them.

Returns
a const reference to m_controlledModes.

Definition at line 1820 of file aoSystem.hpp.

◆ D() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::D

Get the value of the primary mirror diamter.

Returns
the current value of m_D.

Definition at line 1261 of file aoSystem.hpp.

◆ D() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::D ( realT  nD)

Set the value of the primary mirror diameter.

Parameters
[in]nDis the new value of m_D.

Definition at line 1251 of file aoSystem.hpp.

Referenced by mx::AO::analysis::fourierCovarMap(), and SCENARIO().

◆ d_min() [1/4]

template<typename realT , class inputSpectT , typename iosT >
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min

Get the minimum subaperture sampling for all WFS modes.

Returns
the current value of m_d_min.

Definition at line 1302 of file aoSystem.hpp.

◆ d_min() [2/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min ( const std::vector< realT > &  nd)

Set the minimum subaperture sampling for each WFS mode.

This sets the vector

Parameters
[in]ndis the new values of m_d_min

Definition at line 1267 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ d_min() [3/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min ( int  idx,
realT  nd 
)

Set the minimum subaperture sampling for a given WFS mode.

This sets the entry in the vector, if it has the proper length.

Parameters
[in]idxthe index of the WFS mode
[in]ndis the new value of m_d_min[idx]

Definition at line 1275 of file aoSystem.hpp.

◆ d_min() [4/4]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min ( size_t  idx)

Get the minimum subaperture sampling for a given WFS mode.

Returns
the current value of m_d_min[idx]
Parameters
[in]idxthe index of the WFS mode.

Definition at line 1291 of file aoSystem.hpp.

◆ d_opt()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_opt

Calculate the optimum actuator spacing.

Finds the value of m_d_opt where the fitting error is less than than the combined time delay and measurement error.

Returns
the current value of m_d_opt.
Todo:
this should be in a separate valideModes function
Todo:
investigate why we tolerate m_d_min = 0 here. Is this just a config error?

Definition at line 2110 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ deltaTau() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::deltaTau

Get the value of m_deltaTau.

Returns
the current value of m_deltaTau.

Definition at line 1641 of file aoSystem.hpp.

◆ deltaTau() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::deltaTau ( realT  ndel)

Set the value of m_deltaTau.

Parameters
[in]ndelis the new value of m_deltaTau

Definition at line 1633 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ dispAnisoAmpError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::dispAnisoAmpError

Calculate the wavefront error due to dispersive anisoplanatism in the amplitude at a specific spatial frequency.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).

Definition at line 1998 of file aoSystem.hpp.

◆ dispAnisoOPDError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::dispAnisoOPDError ( int  m,
int  n 
)

Calculate the wavefront error due to dispersive anisoplanatism in the OPD at a given spatial frequency.

This calculates the WFE from dispersive anisoplanatism in the OPD.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency

Definition at line 1983 of file aoSystem.hpp.

◆ dispAnisoOPDErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::dispAnisoOPDErrorTotal

Calculate the wavefront error due to dispersive anisoplanatism in the OPD over all specific spatial frequencies.

This totals the WFE from dispersive anisoplanatism in the OPD for the optimum actuator spacing.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the WFE in rad^2 rms at the science wavelength at (m,n).

Definition at line 1991 of file aoSystem.hpp.

◆ dumpAOSystem()

template<typename realT , class inputSpectT , typename iosT >
iosT & mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::dumpAOSystem ( iosT &  ios)

Output current parameters to a stream.

Outputs a formatted list of all current parameters.

Parameters
[in]iosa std::ostream-like stream.

Definition at line 2736 of file aoSystem.hpp.

References mx::dumpGitStatus().

◆ F0() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::F0

Get the value of the 0 magnitude photon rate.

Returns
the current value of m_F0.

Definition at line 1788 of file aoSystem.hpp.

◆ F0() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::F0 ( realT  nF0)

Set the value of the 0 magnitude photon rate.

This is the photon rate at the WFS, photons/sec.

Parameters
[in]nF0is the new value of m_F0.

Definition at line 1780 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ Fbg() [1/4]

template<typename realT , class inputSpectT , typename iosT >
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg

Get the value of the background flux for all WFS modes.

Returns
the current value of m_Fbg

Definition at line 1542 of file aoSystem.hpp.

◆ Fbg() [2/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg ( const std::vector< realT > &  fbg)

Set the value of the background fluxes.

This sets the value of the background flux for each WFS mode

Parameters
[in]fbgis the new value of m_Fbg

Definition at line 1502 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ Fbg() [3/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg ( int  idx,
realT  fbg 
)

Set a single value of the background flux for a given WFS mode.

This sets the entry in the vector if the vector has the proper length

Parameters
[in]idxthe index of the WFS mode
[in]fbgis the new value of m_Fbg[idx]

Definition at line 1515 of file aoSystem.hpp.

◆ Fbg() [4/4]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg ( size_t  idx)

Get the value of the background flux for a given WFS mode.

Returns
m_Fbg[idx]
Parameters
[in]idxthe index of the WFS mode.

Definition at line 1531 of file aoSystem.hpp.

◆ Fg() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fg

Get the photon rate at the current Star magnitude.

Calculates \( F_\gamma = F_0 10^{-0.4 m} \) where \( F_0 \) is m_F0 and \( m \) is m_starMag.

Returns
the current value of the current photon rate.

Definition at line 1814 of file aoSystem.hpp.

◆ Fg() [2/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fg ( realT  mag)

The photon flux at a given star magnitude.

Returns
the photon flux of the star in the bandpass assumed by F0.
Parameters
[in]magis the magnitude of the star.

Definition at line 1808 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ fit_mn_max() [1/2]

template<typename realT , class inputSpectT , typename iosT >
int mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fit_mn_max

Get the value of m_fit_mn_max.

Definition at line 1704 of file aoSystem.hpp.

◆ fit_mn_max() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fit_mn_max ( int  mnm)

Set the value of m_fit_mn_max.

Parameters
[in]mnmis the new value of m_fit_mn_max

Definition at line 1697 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ fittingError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fittingError ( realT  m,
realT  n 
)

Calculate the fitting error at a specific spatial frequency.

Returns
the fitting error in rad^2 rms at the science wavelength at (m,n).
Todo:
handle multiple layers
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency

Definition at line 1910 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ fittingErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fittingErrorTotal

Calculate the total fitting error over all uncorrected spatial frequencies.

This totals the fitting WFE for the optimum actuator spacing and binning.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the total fitting error.

Definition at line 1920 of file aoSystem.hpp.

◆ lam_sci() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_sci

Get the science wavelength.

Returns
the current value of m_lam_sci.

Definition at line 1669 of file aoSystem.hpp.

◆ lam_sci() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_sci ( realT  nlam)

Set the science wavelength.

Parameters
[in]nlamis the new value of m_lam_sci

Definition at line 1661 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ lam_wfs() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_wfs

Get the value of the WFS wavelength.

Returns
the current value of m_lam_wfs.

Definition at line 1403 of file aoSystem.hpp.

◆ lam_wfs() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_wfs ( realT  nlam)

Set the value of the WFS wavelength.

Parameters
[in]nlamis the new value of m_lam_wfs

Definition at line 1395 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ loadConfig()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::loadConfig ( app::appConfigurator config)

Load the configuration of this class from a configurator.

Todo:
: "\test Loading aoAtmosphere config settings \ref tests_ao_analysis_aoAtmosphere_config "[test doc]""
Parameters
[in]configthe app::configurator object

Definition at line 2852 of file aoSystem.hpp.

References mx::app::appConfigurator::isSet().

Referenced by SCENARIO().

◆ loadGMagAOX()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::loadGMagAOX

Load parameters corresponding to the G-MagAO-X system.

Definition at line 1236 of file aoSystem.hpp.

◆ loadGuyon2005()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::loadGuyon2005

Load the default parameters from Guyon, 2005 [9].

Definition at line 1189 of file aoSystem.hpp.

◆ loadMagAOX()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::loadMagAOX

Load parameters corresponding to the MagAO-X system.

Definition at line 1213 of file aoSystem.hpp.

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

◆ measurementError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::measurementError ( realT  m,
realT  n,
realT  d,
int  b 
)

Calculate the measurement noise at a spatial frequency and specified actuator spacing.

Calculates the wavefront phase variance due measurement noise at \( k = (m/D)\hat{u} + (n/D)\hat{v} \).

Returns
the measurement noise in rad^2 rms at the science wavelength
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency
[in]dthe actuator spacing in meters
[in]bthe binning parameter. Either the WFS mode index, or the binning factor minus 1.

Definition at line 1849 of file aoSystem.hpp.

◆ measurementErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::measurementErrorTotal

Calculate the total measurement error over all corrected spatial frequencies.

This totals the measurement WFE at the optimum actuator spacing and binning.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the total WFE due to measurement error.

Definition at line 1873 of file aoSystem.hpp.

◆ minTauWFS() [1/4]

template<typename realT , class inputSpectT , typename iosT >
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::minTauWFS

Get the values of the minimum WFS exposure time.

Returns
the current value of m_minTauWFS.

Definition at line 1588 of file aoSystem.hpp.

◆ minTauWFS() [2/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::minTauWFS ( const std::vector< realT > &  ntau)

Set the value of the minimum WFS exposure times.

This sets the vector of the minimum WFS exposure times

Parameters
[in]ntauis the new value of m_minTauWFS

Definition at line 1548 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ minTauWFS() [3/4]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::minTauWFS ( size_t  idx)

Get the value of the minimum WFS exposure time for a given binning.

Returns
the current value of m_minTauWFS[idx].
Parameters
[in]idxthe index of the WFS mode.

Definition at line 1577 of file aoSystem.hpp.

◆ minTauWFS() [4/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::minTauWFS ( size_t  idx,
realT  ntau 
)

Set a single value of the minimum WFS exposure time for a given WFS mode.

This sets the entry in the vector if the vector has sufficient length.

Parameters
[in]idxthe index of the WFS mode
[in]ntauis the new value of m_minTauWFS

Definition at line 1561 of file aoSystem.hpp.

◆ ncp_alpha() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_alpha

Get the value of the non-common path WFE PSD index.

Returns
the current value of m_ncp_alpha.

Definition at line 1774 of file aoSystem.hpp.

◆ ncp_alpha() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_alpha ( realT  alpha)

Set the value of the non-common path WFE PSD index.

Parameters
[in]alphais the new value of m_ncp_alpha

Definition at line 1766 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ ncp_wfe() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_wfe

Get the value of the non-common path WFE.

Returns
the current value of m_ncp_wfe.

Definition at line 1760 of file aoSystem.hpp.

◆ ncp_wfe() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_wfe ( realT  nwfe)

Set the value of the non-common path WFE.

Parameters
[in]nwfeis the new value of m_ncp_wfe

Definition at line 1752 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ ncpError() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncpError

Calculate the total NCP variance in rad^2.

Returns
the total NCP variance.

Definition at line 2274 of file aoSystem.hpp.

◆ ncpError() [2/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncpError ( int  m,
int  n 
)

Calculate the NCP variance at a spatial frequency.

Finds the NCP variance at \( k = (m/D)\hat{u} + (n/D)\hat{v} \).

Returns
the NCP variance at k.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2263 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ npix_wfs() [1/4]

template<typename realT , class inputSpectT , typename iosT >
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::npix_wfs

Get the number of pixels in the WFS for all WFS modes.

Returns
the current value of m_npix_wfs

Definition at line 1449 of file aoSystem.hpp.

◆ npix_wfs() [2/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::npix_wfs ( const std::vector< realT > &  npix)

Set the number of pixels in the WFS for each WFS mode.

This sets the vector.

Parameters
[in]npixis the new values of m_npix_wfs

Definition at line 1409 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ npix_wfs() [3/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::npix_wfs ( int  idx,
realT  npix 
)

Set the number of pixels in the WFS for a given WFS mode.

This sets the entry in the vector, if it has the proper length.

Parameters
[in]idxthe index of the WFS mode
[in]npixis the new value of m_npix_wfs[idx]

Definition at line 1422 of file aoSystem.hpp.

◆ npix_wfs() [4/4]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::npix_wfs ( size_t  idx)

Get the number of pixels in the WFS for a given WFS mode.

Returns
the current value of m_npix_wfs[idx]
Parameters
[in]idxthe index of the WFS mode.

Definition at line 1438 of file aoSystem.hpp.

◆ optd() [1/2]

template<typename realT , class inputSpectT , typename iosT >
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd

Get the value of m_optd.

Returns
the new value of m_optd_delta.

Definition at line 1316 of file aoSystem.hpp.

◆ optd() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd ( bool  od)

Set whether or not the value of d is optimized or just set to m_d_min.

Parameters
[in]odis the new value of m_optd

Definition at line 1308 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ optd_delta() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd_delta

Get the value of the fractional change in actuator spacing for optimization..

Returns
the value of m_optd_delta.

Definition at line 1330 of file aoSystem.hpp.

◆ optd_delta() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd_delta ( realT  odd)

Set the fractional change in actuator spacing for optimization.

Sets the fraction of m_d_min by which the optimizer changes actautor spacing.

Parameters
[in]oddis the new value of m_optd_delta

Definition at line 1322 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ optimumTauWFS() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optimumTauWFS ( realT  m,
realT  n 
)

Calculate the optimum exposure time for a given spatial frequency at the optimum actuator spacing.

Finds the optimum exposure time at \( k = (m/D)\hat{u} + (n/D)\hat{v} \). If optd == false this uses the minimum actuator spacing.

Todo:
Check inclusion of X in parameters
Returns
the optimum expsoure time.
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v

Definition at line 2101 of file aoSystem.hpp.

◆ optimumTauWFS() [2/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optimumTauWFS ( realT  m,
realT  n,
realT  d,
int  b 
)

Calculate the optimum exposure time for a given spatial frequency at a specified actuator spacing.

Finds the optimum exposure time at \( k = (m/D)\hat{u} + (n/D)\hat{v} \).

Todo:
Check inclusion of X in parameters
Returns
the optimum expsoure time.
Todo:
handle multiple layers
Parameters
[in]mis the spatial frequency index in u
[in]nis the spatial frequency index in v
[in]dthe actuator spacing, in meters
[in]bthe binning parameter. Either the WFS mode index, or the binning factor minus 1.

Definition at line 2027 of file aoSystem.hpp.

References mx::astro::constants::c(), mx::astro::constants::k(), and mx::math::quarticRoots().

◆ optTau() [1/2]

template<typename realT , class inputSpectT , typename iosT >
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optTau

Get the value of m_optTau.

Returns
the current value of m_optTau.

Definition at line 1655 of file aoSystem.hpp.

◆ optTau() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optTau ( bool  ot)

Set the value of m_optTau.

Parameters
[in]otis the new value of m_optTau

Definition at line 1647 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ ron_wfs() [1/4]

template<typename realT , class inputSpectT , typename iosT >
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ron_wfs

Get the value of the WFS readout noise for all WFS modes.

Returns
the current value of m_ron_wfs

Definition at line 1496 of file aoSystem.hpp.

◆ ron_wfs() [2/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ron_wfs ( const std::vector< realT > &  nron)

Set the value of the WFS readout noise for each WFS mode.

This sets the vector.

Parameters
[in]nronis the new value of m_ron_wfs

Definition at line 1455 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ ron_wfs() [3/4]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ron_wfs ( int  idx,
realT  nron 
)

Set the value of the WFS readout noise for a given bining mode.

This sets the entry in the vector if the vector has the proper length

Parameters
[in]idxthe index of the WFS mode
[in]nronis the new value of m_ron_wfs [idx]

Definition at line 1468 of file aoSystem.hpp.

◆ ron_wfs() [4/4]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ron_wfs ( size_t  idx)

Get the value of the WFS readout noise for a given WFS mode.

Returns
the current value of m_ron_wfs[idx]
Parameters
[in]idxthe index of the WFS mode.

Definition at line 1485 of file aoSystem.hpp.

◆ secZeta()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::secZeta

Get the zecant of the zenith angle.

Returns
the current value of m_secZeta

Definition at line 1691 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ setupConfig()

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::setupConfig ( app::appConfigurator config)

Setup the configurator to configure this class.

todo: "\test Loading aoAtmosphere config settings \ref tests_ao_analysis_aoAtmosphere_config "[test doc]"

Parameters
[in]configthe app::configurator object

Definition at line 2812 of file aoSystem.hpp.

References mx::app::appConfigurator::add().

Referenced by SCENARIO().

◆ signal2Noise2()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::signal2Noise2 ( realT &  Nph,
realT  tau_wfs,
realT  d,
int  b 
)

Calculate the terms of the signal to noise ratio squared (S/N)^2 for the WFS measurement.

The S/N squared is

\[ (S/N)^2 = \frac{ F_\gamma^2 \tau_{wfs}^2 }{ F_\gamma \tau_{wfs} + n_{pix} F_{bg} \tau_{wfs} + n_{pix} \sigma_{ron}^2 } \]

Returns
the S/N squared
Parameters
[out]Nphthe number of photons
[in]tau_wfsspecifies the WFS exposure time. If 0, then optimumTauWFS is used
[in]dthe actuator spacing in meters, used if binning WFS pixels
[in]bthe binning parameter. Either the WFS mode index, or the binning factor minus 1.

Definition at line 1826 of file aoSystem.hpp.

◆ spatialFilter_ku() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_ku

Get the value of spatialFilter_ku.

Returns
the current value of m_spatialFilter_ku

Definition at line 1732 of file aoSystem.hpp.

◆ spatialFilter_ku() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_ku ( realT  ku)

Set the value of spatialFilter_ku.

Parameters
[in]kuis the new value of spatialFilter_ku

Definition at line 1724 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ spatialFilter_kv() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_kv

Get the value of spatialFilter_kv.

Returns
the current value of m_spatialFilter_kv

Definition at line 1746 of file aoSystem.hpp.

◆ spatialFilter_kv() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_kv ( realT  kv)

Set the value of spatialFilter_kv.

Parameters
[in]kvis the new value of spatialFilter_kv

Definition at line 1738 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ starMag() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::starMag

Get the value of the Star's magnitude.

Returns
the current value of m_starMag

Definition at line 1802 of file aoSystem.hpp.

◆ starMag() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::starMag ( realT  nmag)

Set the value of the Star's magnitude.

Parameters
[in]nmagis the new value of m_starMag.

Definition at line 1794 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ strehl() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::strehl

Get the current Strehl ratio.

If no changes, merely returns m_strehl. Calls calcStrehl if there are changes. Strehl is calculated using the extended Marechal approximation:

\[ S = e^{-\sigma_{wfe}^2} \]

where \( \sigma_{wfe}^2 \) is the current value of m_wfeVar.

Returns
the current value of m_strehl.

Definition at line 2423 of file aoSystem.hpp.

◆ strehl() [2/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::strehl ( realT  d,
int  b 
)

Get the Strehl ratio for a given actuator pitch and WFS WFS mode.

Strehl is calculated using the extended Marechal approximation:

\[ S = e^{-\sigma_{wfe}^2} \]

where \( \sigma_{wfe}^2 \) is the WFE for the spacing and binning

Returns
the strehl for these values
Parameters
[in]dthe actuator spacing, in meters
[in]bthe binning parameter. Either the WFS mode index, or the binning factor minus 1.

Definition at line 2280 of file aoSystem.hpp.

◆ tauWFS() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::tauWFS

Get the value of the minimum WFS exposure time.

Returns
the current value of m_tauWFS.

Definition at line 1627 of file aoSystem.hpp.

◆ tauWFS() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::tauWFS ( realT  ntau)

Set the value of the WFS exposure time.

Parameters
[in]ntauis the new value of m_tauWFS

Definition at line 1619 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ timeDelayError()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::timeDelayError ( realT  m,
realT  n,
realT  d,
int  b 
)

Calculate the time delay at a spatial frequency at the optimum exposure time and the specified actuator spacing.

Calculates the wavefront phase variance due to time delay at \( f = (m/D)\hat{u} + (n/D)\hat{v} \).

Returns
the measurement noise in rad^2 rms at the science wavelength
Todo:
handle multiple layers
Parameters
[in]mspecifies the u component of the spatial frequency
[in]nspecifies the v component of the spatial frequency
[in]dthe actuator spacing, in meters
[in]bthe binning parameter. Either the WFS mode index, or the binning factor minus 1.

Definition at line 1880 of file aoSystem.hpp.

References mx::astro::constants::k().

◆ timeDelayErrorTotal()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::timeDelayErrorTotal

Calculate the time delay error over all corrected spatial frequencies.

This totals the time delay WFE at the optimum actuator spacing and binning.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Returns
the total WFE due to time delay.

Definition at line 1902 of file aoSystem.hpp.

◆ wfeVar()

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::wfeVar

Get the current value of the total WFE variance.

If no changes, merely returns m_wfeVar. Calls calcStrehl if there are changes.

Returns
the current value of m_wfeVar;

Definition at line 2415 of file aoSystem.hpp.

◆ wfsBeta() [1/3]

template<typename realT , class inputSpectT , typename iosT >
wfs< realT, iosT > * mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::wfsBeta

Get the WFS Beta pointer.

Returns
a pointer to the current m_wfsBeta

Definition at line 1372 of file aoSystem.hpp.

◆ wfsBeta() [2/3]

template<typename realT , class inputSpectT , typename iosT >
template<typename wfsT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::wfsBeta ( const wfsT &  w)

Set the WFS Beta pointer.

The WFS beta parameter determines the photon noise sensitivity.

Template Parameters
wfsTis a type derived from ao::analysis::wfs
Parameters
[in]wan object derived from ao::analysis::wfs base class

Definition at line 1337 of file aoSystem.hpp.

Referenced by SCENARIO().

◆ wfsBeta() [3/3]

template<typename realT , class inputSpectT , typename iosT >
template<typename wfsT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::wfsBeta ( const wfsT *  w)

Set the WFS Beta pointer.

The WFS beta parameter determines the photon noise sensitivity.

Template Parameters
wfsTis a type derived from ao::analysis::wfs
Parameters
[in]wpointer to an object derived from ao::analysis::wfs base class. If nullptr then a new object is allocated and managed.

Definition at line 1351 of file aoSystem.hpp.

◆ zeta() [1/2]

template<typename realT , class inputSpectT , typename iosT >
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::zeta

Get the zenith angle.

Returns
the current value of m_zeta

Definition at line 1685 of file aoSystem.hpp.

◆ zeta() [2/2]

template<typename realT , class inputSpectT , typename iosT >
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::zeta ( realT  nz)

Set the zenith angle, and its secant.

Parameters
[in]nzThe new value of m_zeta

Definition at line 1675 of file aoSystem.hpp.

Referenced by SCENARIO().

Member Data Documentation

◆ m_bin_npix

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_bin_npix {true}
protected

Flag controlling whether or not to bin WFS pixels according to the actuator spacing.

Definition at line 100 of file aoSystem.hpp.

◆ m_bin_opt

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
int mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_bin_opt {0}
protected

The optimum binning factor. If WFS modes are used, this is the mode index (0 to N-1). If not, it is 1 minus the pixel binning factor. It is always 1 minus the actuator binning factor.

Definition at line 102 of file aoSystem.hpp.

◆ m_circularLimit

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_circularLimit {false}
protected

Flag to indicate that the spatial frequency limit is circular, not square.

Definition at line 117 of file aoSystem.hpp.

◆ m_controlledModes

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
Eigen::Array<bool,-1,-1> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_controlledModes
protected

Map of which modes are under control. Set by calcStrehl.

Definition at line 132 of file aoSystem.hpp.

◆ m_D

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_D {0}
protected

Telescope diameter [m].

Definition at line 81 of file aoSystem.hpp.

◆ m_d_min

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
std::vector<realT> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_d_min {0}
protected

Minimum AO system actuator pitch [m]. One per WFS mode.

Definition at line 83 of file aoSystem.hpp.

◆ m_d_opt

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_d_opt {0}
protected

Current optimum AO system actuator pitch [m].

Definition at line 85 of file aoSystem.hpp.

◆ m_deltaTau

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_deltaTau {0}
protected

Loop latency [sec].

Definition at line 106 of file aoSystem.hpp.

◆ m_dminChanged

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_dminChanged {true}
protected

Flag to indicate that d_min has changed.

Definition at line 130 of file aoSystem.hpp.

◆ m_F0

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_F0 {0}
protected

0 mag flux from star at WFS [photons/sec]

Definition at line 125 of file aoSystem.hpp.

◆ m_Fbg

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
std::vector<realT> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_Fbg {0}
protected

Background flux, [photons/sec/pixel]. One per WFS mode.

Definition at line 97 of file aoSystem.hpp.

◆ m_fit_mn_max

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
int mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_fit_mn_max {100}
protected

Maximum spatial frequency index to use for fitting error calculation.

Definition at line 115 of file aoSystem.hpp.

◆ m_lam_sci

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_lam_sci {0}
protected

Science wavelength [m].

Definition at line 110 of file aoSystem.hpp.

◆ m_lam_wfs

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_lam_wfs {0}
protected

WFS wavelength [m].

Definition at line 92 of file aoSystem.hpp.

◆ m_minTauWFS

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
std::vector<realT> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_minTauWFS {0}
protected

Minimum WFS exposure time [sec]. One per WFS mode.

Definition at line 98 of file aoSystem.hpp.

◆ m_ncp_alpha

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_ncp_alpha {2}
protected

Power-law exponent for the NCP aberations. Default is 2.

Definition at line 123 of file aoSystem.hpp.

◆ m_ncp_wfe

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_ncp_wfe {0}
protected

Static WFE [m rms].

Definition at line 122 of file aoSystem.hpp.

◆ m_npix_wfs

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
std::vector<realT> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_npix_wfs {0}
protected

Number of WFS pixels. One per WFS mode.

Definition at line 95 of file aoSystem.hpp.

◆ m_optd

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_optd {false}
protected

Flag controlling whether actuator pitch is optimized (true) or just uses m_d_min (false). Default: true.

Definition at line 86 of file aoSystem.hpp.

◆ m_optd_delta

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_optd_delta {1.0}
protected

The fractional change from d_min used in optimization. Set to 1 for integer binnings, > 1 for finer sampling.

Definition at line 87 of file aoSystem.hpp.

◆ m_optTau

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_optTau {true}
protected

Flag controlling whether optimum integration time is calculated (true) enforcing m_minTauWFS, or if m_tauWFS is used (false). Default: true.

Definition at line 108 of file aoSystem.hpp.

◆ m_ownWfsBeta

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_ownWfsBeta {false}
protected

Flag indicating if the WFS beta_p pointer is owned by this instance.

Definition at line 90 of file aoSystem.hpp.

◆ m_ron_wfs

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
std::vector<realT> mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_ron_wfs {0}
protected

WFS readout noise [electrons/pix]. One per WFS mode.

Definition at line 96 of file aoSystem.hpp.

◆ m_secZeta

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_secZeta {1}
protected

Secant of the Zenith angle (calculated)

Definition at line 113 of file aoSystem.hpp.

◆ m_spatialFilter_ku

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_spatialFilter_ku {std::numeric_limits<realT>::max()}
protected

The spatial filter cutoff in u, [m^-1].

Definition at line 119 of file aoSystem.hpp.

◆ m_spatialFilter_kv

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_spatialFilter_kv {std::numeric_limits<realT>::max()}
protected

The spatial filter cutoff in v, [m^-1].

Definition at line 120 of file aoSystem.hpp.

◆ m_specsChanged

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
bool mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_specsChanged {true}
protected

Flag to indicate that a specification has changed.

Definition at line 129 of file aoSystem.hpp.

◆ m_starMag

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_starMag {0}
protected

The magnitude of the star.

Definition at line 127 of file aoSystem.hpp.

◆ m_strehl

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_strehl {0}
protected

Strehl ratio, a calculated quantity. Never use this directdy, instead use strehl().

Definition at line 144 of file aoSystem.hpp.

◆ m_tauWFS

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_tauWFS {0}
protected

Actual WFS exposure time [sec].

Definition at line 104 of file aoSystem.hpp.

◆ m_wfeAnisoOPD

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeAnisoOPD {0}
protected

Total WFE due to dispersive anisoplanatism OPD.

Definition at line 139 of file aoSystem.hpp.

◆ m_wfeChromIndex

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeChromIndex {0}
protected

Total WFE due to the chromaticity of the index of refraction [rad^2 at lam_Sci].

Definition at line 138 of file aoSystem.hpp.

◆ m_wfeChromScintOPD

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeChromScintOPD {0}
protected

Total WFE due to the chromaticity of scintillation OPD [rad^2 at lam_sc].

Definition at line 137 of file aoSystem.hpp.

◆ m_wfeFitting

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeFitting {0}
protected

Total WFE due to fitting error [rad^2 at m_lam_sci].

Definition at line 136 of file aoSystem.hpp.

◆ m_wfeMeasurement

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeMeasurement {0}
protected

Total WFE due to measurement a error [rad^2 at m_lam_sci].

Definition at line 134 of file aoSystem.hpp.

◆ m_wfeNCP

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeNCP {0}
protected

Total WFE due to NCP errors [rad^2 at m_lam_sci].

Definition at line 141 of file aoSystem.hpp.

◆ m_wfeTimeDelay

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeTimeDelay {0}
protected

Total WFE due to time delay [rad^2 at m_lam_sci].

Definition at line 135 of file aoSystem.hpp.

◆ m_wfeVar

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfeVar {0}
protected

The WFE variance, in meters^2. Never use this directly, instead use wfeVar().

Definition at line 143 of file aoSystem.hpp.

◆ m_wfsBeta

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
wfs<realT, iosT>* mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_wfsBeta {nullptr}
protected

The WFS beta_p class.

Definition at line 89 of file aoSystem.hpp.

◆ m_zeta

template<typename _realT , class _inputSpectT , typename iosT = std::ostream>
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::m_zeta {0}
protected

Zenith angle [radians].

Definition at line 112 of file aoSystem.hpp.


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