mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Describes an analytic adaptive optics (AO) system.
Templatized by the turbulence power spectral density (PSD).
realT | the floating point type used for all calculations |
inputSpecT | specifies the turbulence spatial PSD type |
iosT | is 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 | |
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... | |
mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::aoSystem |
mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::~aoSystem |
Destructor.
Definition at line 1180 of file aoSystem.hpp.
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.
[in] | m | the spatial frequency index |
[in] | n | the spatial frequency index |
Definition at line 1378 of file aoSystem.hpp.
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.
[in] | m | the spatial frequency index |
[in] | n | the spatial frequency index |
Definition at line 1386 of file aoSystem.hpp.
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::bin_npix |
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::bin_npix | ( | bool | bnp | ) |
Set the value of the pixel binning flag.
[in] | bnp | is the new value of m_bin_npix |
Definition at line 1594 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
Definition at line 1611 of file aoSystem.hpp.
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio |
Definition at line 2514 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::C0Map | ( | imageT & | map, |
bool | normStrehl | ||
) |
Calculate a 2D map of contrast C0.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2525 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2504 of file aoSystem.hpp.
References mx::astro::constants::k().
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio |
Definition at line 2544 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2554 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2533 of file aoSystem.hpp.
References mx::astro::constants::k().
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2571 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2581 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2562 of file aoSystem.hpp.
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2597 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2607 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2589 of file aoSystem.hpp.
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2628 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2638 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2615 of file aoSystem.hpp.
References mx::astro::constants::k().
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2659 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2669 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2646 of file aoSystem.hpp.
References mx::astro::constants::k().
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].
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2689 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2699 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2677 of file aoSystem.hpp.
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]
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
normStrehl | flag controls whether the contrast is normalized by Strehl ratio. |
Definition at line 2718 of file aoSystem.hpp.
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.
imageT | is an Eigen-like image type. |
[in] | map | the map image to be filled in with contrast |
Definition at line 2728 of file aoSystem.hpp.
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().
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2707 of file aoSystem.hpp.
References mx::astro::constants::k().
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.
varFuncT | is a function-pointer-to-member (of this class) with signature realT(*f)(realT, realT) |
[in] | m | is the spatial frequency index in u/ |
[in] | n | is the spatial frequency index in v. |
[in] | normStrehl | flag controls whether the contrast is normalized by Strehl ratio/ |
[in] | varFunc | the variance function to use. |
[in] | doFittingError | flag 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().
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.
imageT | is an Eigen-like image |
CfuncT | is a function-pointer-to-member (of this class) with signature realT (*f)(realT, realT, bool) |
[out] | im | the map image to be filled in. |
[in] | Cfunc | the raw contrast function to use for filling in the map. |
[in] | normStrehl | flag controlling whether or not the map is normalized by Strehl |
Definition at line 2479 of file aoSystem.hpp.
|
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.
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.
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
Definition at line 1968 of file aoSystem.hpp.
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.
Definition at line 1976 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< _realT, _inputSpectT, iosT >::chromScintAmpError | ( | ) |
Calculate the wavefront error due to scintillation chromaticity in amplitude over all spatial frequencies.
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.
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
Definition at line 1942 of file aoSystem.hpp.
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.
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
Definition at line 1927 of file aoSystem.hpp.
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.
Definition at line 1935 of file aoSystem.hpp.
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::circularLimit |
Get the value of the circularLimit flag.
Definition at line 1718 of file aoSystem.hpp.
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.
[in] | cl | the new value of the circularLimit flag |
Definition at line 1710 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
Definition at line 1820 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::D |
Get the value of the primary mirror diamter.
Definition at line 1261 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::D | ( | realT | nD | ) |
Set the value of the primary mirror diameter.
[in] | nD | is the new value of m_D. |
Definition at line 1251 of file aoSystem.hpp.
Referenced by mx::AO::analysis::fourierCovarMap(), and SCENARIO().
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min |
Get the minimum subaperture sampling for all WFS modes.
Definition at line 1302 of file aoSystem.hpp.
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
[in] | nd | is the new values of m_d_min |
Definition at line 1267 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
[in] | idx | the index of the WFS mode |
[in] | nd | is the new value of m_d_min[idx] |
Definition at line 1275 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::d_min | ( | size_t | idx | ) |
Get the minimum subaperture sampling for a given WFS mode.
[in] | idx | the index of the WFS mode. |
Definition at line 1291 of file aoSystem.hpp.
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.
Definition at line 2110 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::deltaTau |
Get the value of m_deltaTau.
Definition at line 1641 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::deltaTau | ( | realT | ndel | ) |
Set the value of m_deltaTau.
[in] | ndel | is the new value of m_deltaTau |
Definition at line 1633 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
Definition at line 1998 of file aoSystem.hpp.
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.
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
Definition at line 1983 of file aoSystem.hpp.
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.
Definition at line 1991 of file aoSystem.hpp.
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.
[in] | ios | a std::ostream-like stream. |
Definition at line 2736 of file aoSystem.hpp.
References mx::dumpGitStatus().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::F0 |
Get the value of the 0 magnitude photon rate.
Definition at line 1788 of file aoSystem.hpp.
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.
[in] | nF0 | is the new value of m_F0. |
Definition at line 1780 of file aoSystem.hpp.
Referenced by SCENARIO().
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg |
Get the value of the background flux for all WFS modes.
Definition at line 1542 of file aoSystem.hpp.
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
[in] | fbg | is the new value of m_Fbg |
Definition at line 1502 of file aoSystem.hpp.
Referenced by SCENARIO().
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
[in] | idx | the index of the WFS mode |
[in] | fbg | is the new value of m_Fbg[idx] |
Definition at line 1515 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fbg | ( | size_t | idx | ) |
Get the value of the background flux for a given WFS mode.
[in] | idx | the index of the WFS mode. |
Definition at line 1531 of file aoSystem.hpp.
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.
Definition at line 1814 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::Fg | ( | realT | mag | ) |
The photon flux at a given star magnitude.
[in] | mag | is the magnitude of the star. |
Definition at line 1808 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fit_mn_max | ( | int | mnm | ) |
Set the value of m_fit_mn_max.
[in] | mnm | is the new value of m_fit_mn_max |
Definition at line 1697 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::fittingError | ( | realT | m, |
realT | n | ||
) |
Calculate the fitting error at a specific spatial frequency.
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
Definition at line 1910 of file aoSystem.hpp.
References mx::astro::constants::k().
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.
Definition at line 1920 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_sci |
Get the science wavelength.
Definition at line 1669 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_sci | ( | realT | nlam | ) |
Set the science wavelength.
[in] | nlam | is the new value of m_lam_sci |
Definition at line 1661 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_wfs |
Get the value of the WFS wavelength.
Definition at line 1403 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::lam_wfs | ( | realT | nlam | ) |
Set the value of the WFS wavelength.
[in] | nlam | is the new value of m_lam_wfs |
Definition at line 1395 of file aoSystem.hpp.
Referenced by SCENARIO().
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::loadConfig | ( | app::appConfigurator & | config | ) |
Load the configuration of this class from a configurator.
[in] | config | the app::configurator object |
Definition at line 2852 of file aoSystem.hpp.
References mx::app::appConfigurator::isSet().
Referenced by SCENARIO().
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.
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.
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().
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} \).
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
[in] | d | the actuator spacing in meters |
[in] | b | the binning parameter. Either the WFS mode index, or the binning factor minus 1. |
Definition at line 1849 of file aoSystem.hpp.
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.
Definition at line 1873 of file aoSystem.hpp.
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::minTauWFS |
Get the values of the minimum WFS exposure time.
Definition at line 1588 of file aoSystem.hpp.
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
[in] | ntau | is the new value of m_minTauWFS |
Definition at line 1548 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
[in] | idx | the index of the WFS mode. |
Definition at line 1577 of file aoSystem.hpp.
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.
[in] | idx | the index of the WFS mode |
[in] | ntau | is the new value of m_minTauWFS |
Definition at line 1561 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_alpha |
Get the value of the non-common path WFE PSD index.
Definition at line 1774 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_alpha | ( | realT | alpha | ) |
Set the value of the non-common path WFE PSD index.
[in] | alpha | is the new value of m_ncp_alpha |
Definition at line 1766 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_wfe |
Get the value of the non-common path WFE.
Definition at line 1760 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncp_wfe | ( | realT | nwfe | ) |
Set the value of the non-common path WFE.
[in] | nwfe | is the new value of m_ncp_wfe |
Definition at line 1752 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ncpError |
Calculate the total NCP variance in rad^2.
Definition at line 2274 of file aoSystem.hpp.
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} \).
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2263 of file aoSystem.hpp.
References mx::astro::constants::k().
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::npix_wfs |
Get the number of pixels in the WFS for all WFS modes.
Definition at line 1449 of file aoSystem.hpp.
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.
[in] | npix | is the new values of m_npix_wfs |
Definition at line 1409 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
[in] | idx | the index of the WFS mode |
[in] | npix | is the new value of m_npix_wfs[idx] |
Definition at line 1422 of file aoSystem.hpp.
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.
[in] | idx | the index of the WFS mode. |
Definition at line 1438 of file aoSystem.hpp.
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd |
Get the value of m_optd.
Definition at line 1316 of file aoSystem.hpp.
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.
[in] | od | is the new value of m_optd |
Definition at line 1308 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optd_delta |
Get the value of the fractional change in actuator spacing for optimization..
Definition at line 1330 of file aoSystem.hpp.
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.
[in] | odd | is the new value of m_optd_delta |
Definition at line 1322 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
Definition at line 2101 of file aoSystem.hpp.
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} \).
[in] | m | is the spatial frequency index in u |
[in] | n | is the spatial frequency index in v |
[in] | d | the actuator spacing, in meters |
[in] | b | the 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().
bool mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optTau |
Get the value of m_optTau.
Definition at line 1655 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::optTau | ( | bool | ot | ) |
Set the value of m_optTau.
[in] | ot | is the new value of m_optTau |
Definition at line 1647 of file aoSystem.hpp.
Referenced by SCENARIO().
std::vector< realT > mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::ron_wfs |
Get the value of the WFS readout noise for all WFS modes.
Definition at line 1496 of file aoSystem.hpp.
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.
[in] | nron | is the new value of m_ron_wfs |
Definition at line 1455 of file aoSystem.hpp.
Referenced by SCENARIO().
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
[in] | idx | the index of the WFS mode |
[in] | nron | is the new value of m_ron_wfs [idx] |
Definition at line 1468 of file aoSystem.hpp.
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.
[in] | idx | the index of the WFS mode. |
Definition at line 1485 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::secZeta |
Get the zecant of the zenith angle.
Definition at line 1691 of file aoSystem.hpp.
Referenced by SCENARIO().
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]"
[in] | config | the app::configurator object |
Definition at line 2812 of file aoSystem.hpp.
References mx::app::appConfigurator::add().
Referenced by SCENARIO().
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 } \]
[out] | Nph | the number of photons |
[in] | tau_wfs | specifies the WFS exposure time. If 0, then optimumTauWFS is used |
[in] | d | the actuator spacing in meters, used if binning WFS pixels |
[in] | b | the binning parameter. Either the WFS mode index, or the binning factor minus 1. |
Definition at line 1826 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_ku |
Get the value of spatialFilter_ku.
Definition at line 1732 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_ku | ( | realT | ku | ) |
Set the value of spatialFilter_ku.
[in] | ku | is the new value of spatialFilter_ku |
Definition at line 1724 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_kv |
Get the value of spatialFilter_kv.
Definition at line 1746 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::spatialFilter_kv | ( | realT | kv | ) |
Set the value of spatialFilter_kv.
[in] | kv | is the new value of spatialFilter_kv |
Definition at line 1738 of file aoSystem.hpp.
Referenced by SCENARIO().
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::starMag |
Get the value of the Star's magnitude.
Definition at line 1802 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::starMag | ( | realT | nmag | ) |
Set the value of the Star's magnitude.
[in] | nmag | is the new value of m_starMag. |
Definition at line 1794 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
Definition at line 2423 of file aoSystem.hpp.
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
[in] | d | the actuator spacing, in meters |
[in] | b | the binning parameter. Either the WFS mode index, or the binning factor minus 1. |
Definition at line 2280 of file aoSystem.hpp.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::tauWFS |
Get the value of the minimum WFS exposure time.
Definition at line 1627 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::tauWFS | ( | realT | ntau | ) |
Set the value of the WFS exposure time.
[in] | ntau | is the new value of m_tauWFS |
Definition at line 1619 of file aoSystem.hpp.
Referenced by SCENARIO().
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} \).
[in] | m | specifies the u component of the spatial frequency |
[in] | n | specifies the v component of the spatial frequency |
[in] | d | the actuator spacing, in meters |
[in] | b | the 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().
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.
Definition at line 1902 of file aoSystem.hpp.
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.
Definition at line 2415 of file aoSystem.hpp.
wfs< realT, iosT > * mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::wfsBeta |
Get the WFS Beta pointer.
Definition at line 1372 of file aoSystem.hpp.
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.
wfsT | is a type derived from ao::analysis::wfs |
[in] | w | an object derived from ao::analysis::wfs base class |
Definition at line 1337 of file aoSystem.hpp.
Referenced by SCENARIO().
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.
wfsT | is a type derived from ao::analysis::wfs |
[in] | w | pointer 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.
realT mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::zeta |
Get the zenith angle.
Definition at line 1685 of file aoSystem.hpp.
void mx::AO::analysis::aoSystem< realT, inputSpectT, iosT >::zeta | ( | realT | nz | ) |
Set the zenith angle, and its secant.
[in] | nz | The new value of m_zeta |
Definition at line 1675 of file aoSystem.hpp.
Referenced by SCENARIO().
|
protected |
Flag controlling whether or not to bin WFS pixels according to the actuator spacing.
Definition at line 100 of file aoSystem.hpp.
|
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.
|
protected |
Flag to indicate that the spatial frequency limit is circular, not square.
Definition at line 117 of file aoSystem.hpp.
|
protected |
Map of which modes are under control. Set by calcStrehl.
Definition at line 132 of file aoSystem.hpp.
|
protected |
Telescope diameter [m].
Definition at line 81 of file aoSystem.hpp.
|
protected |
Minimum AO system actuator pitch [m]. One per WFS mode.
Definition at line 83 of file aoSystem.hpp.
|
protected |
Current optimum AO system actuator pitch [m].
Definition at line 85 of file aoSystem.hpp.
|
protected |
Loop latency [sec].
Definition at line 106 of file aoSystem.hpp.
|
protected |
Flag to indicate that d_min has changed.
Definition at line 130 of file aoSystem.hpp.
|
protected |
0 mag flux from star at WFS [photons/sec]
Definition at line 125 of file aoSystem.hpp.
|
protected |
Background flux, [photons/sec/pixel]. One per WFS mode.
Definition at line 97 of file aoSystem.hpp.
|
protected |
Maximum spatial frequency index to use for fitting error calculation.
Definition at line 115 of file aoSystem.hpp.
|
protected |
Science wavelength [m].
Definition at line 110 of file aoSystem.hpp.
|
protected |
WFS wavelength [m].
Definition at line 92 of file aoSystem.hpp.
|
protected |
Minimum WFS exposure time [sec]. One per WFS mode.
Definition at line 98 of file aoSystem.hpp.
|
protected |
Power-law exponent for the NCP aberations. Default is 2.
Definition at line 123 of file aoSystem.hpp.
|
protected |
Static WFE [m rms].
Definition at line 122 of file aoSystem.hpp.
|
protected |
Number of WFS pixels. One per WFS mode.
Definition at line 95 of file aoSystem.hpp.
|
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.
|
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.
|
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.
|
protected |
Flag indicating if the WFS beta_p pointer is owned by this instance.
Definition at line 90 of file aoSystem.hpp.
|
protected |
WFS readout noise [electrons/pix]. One per WFS mode.
Definition at line 96 of file aoSystem.hpp.
|
protected |
Secant of the Zenith angle (calculated)
Definition at line 113 of file aoSystem.hpp.
|
protected |
The spatial filter cutoff in u, [m^-1].
Definition at line 119 of file aoSystem.hpp.
|
protected |
The spatial filter cutoff in v, [m^-1].
Definition at line 120 of file aoSystem.hpp.
|
protected |
Flag to indicate that a specification has changed.
Definition at line 129 of file aoSystem.hpp.
|
protected |
The magnitude of the star.
Definition at line 127 of file aoSystem.hpp.
|
protected |
Strehl ratio, a calculated quantity. Never use this directdy, instead use strehl().
Definition at line 144 of file aoSystem.hpp.
|
protected |
Actual WFS exposure time [sec].
Definition at line 104 of file aoSystem.hpp.
|
protected |
Total WFE due to dispersive anisoplanatism OPD.
Definition at line 139 of file aoSystem.hpp.
|
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.
|
protected |
Total WFE due to the chromaticity of scintillation OPD [rad^2 at lam_sc].
Definition at line 137 of file aoSystem.hpp.
|
protected |
Total WFE due to fitting error [rad^2 at m_lam_sci].
Definition at line 136 of file aoSystem.hpp.
|
protected |
Total WFE due to measurement a error [rad^2 at m_lam_sci].
Definition at line 134 of file aoSystem.hpp.
|
protected |
Total WFE due to NCP errors [rad^2 at m_lam_sci].
Definition at line 141 of file aoSystem.hpp.
|
protected |
Total WFE due to time delay [rad^2 at m_lam_sci].
Definition at line 135 of file aoSystem.hpp.
|
protected |
The WFE variance, in meters^2. Never use this directly, instead use wfeVar().
Definition at line 143 of file aoSystem.hpp.
|
protected |
The WFS beta_p class.
Definition at line 89 of file aoSystem.hpp.
|
protected |
Zenith angle [radians].
Definition at line 112 of file aoSystem.hpp.