mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT > Class Template Reference

template<typename _realT, typename _wfsT, typename _reconT, typename _filterT, typename _dmT, typename _turbSeqT, typename _coronT>
class mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >

A simulated AO system.

Minimum requirement for _turbSeqT:

{
int wfPS(realT ps); //Sets the wavefront platescale (only needed for cascaded systems).
int frames(); //Returns the number of frames, sets the number of iterations to run.
int nextWF(wavefront<realT> & wf); //Fills in the wavefront with phase and amplitude
};

Definition at line 64 of file simulatedAOSystem.hpp.

#include <ao/sim/simulatedAOSystem.hpp>

Public Types

typedef _realT realT
 The floating point type used for all calculations. More...
 
typedef mx::AO::sim::wavefront< realTwavefrontT
 The wavefront type. More...
 
typedef Eigen::Array< realT, Eigen::Dynamic, Eigen::Dynamic > imageT
 The real image type. More...
 
typedef wfp::imagingArray< std::complex< realT >, wfp::fftwAllocator< std::complex< realT > >, 0 > complexImageT
 The complex image type. More...
 

Public Member Functions

 simulatedAOSystem ()
 Default c'tor. More...
 
 ~simulatedAOSystem ()
 Destructor. More...
 
int initSystem (const std::string &sysName, typename dmT::specT &dmSpec, const std::string &wfsName, const std::string &pupilName, const int &wfSz)
 Initialize the system. More...
 
void takeResponseMatrix (realT amp, std::string rmatName, int nmodes=0)
 Measure the system response matrix. More...
 

Public Attributes

std::string _sysName
 The system name for use in mx::AO::path. More...
 
std::string _wfsName
 The WFS name for use in the mx::AO::path. More...
 
std::string _pupilName
 The pupil name for use in the mx::AO::path. More...
 
imageT _pupil
 The system pupil. This is generally a binary mask and will be applied at various points in the propagation. More...
 
imageT _pupilMask
 A pupil mask which is applied once at the beginning of propagation. Could be apodized and/or different from _pupil. More...
 
bool m_writeWavefronts {true}
 
int m_saveSz {0}
 

Protected Attributes

realT m_simStep
 The simulation step size in seconds. More...
 

Member Access

bool m_doCoron {false}
 
int simStep (const double &ss)
 Set the simulation step size. More...
 
double simStep ()
 Get the simulation step size. More...
 
int D (const realT &nD)
 
realT D ()
 
int wfPS (const realT &nwfPS)
 
realT wfPS ()
 
int Dpix ()
 
int wfSz (const int &nwfSz)
 
int wfSz ()
 

Member Typedef Documentation

◆ complexImageT

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
typedef wfp::imagingArray<std::complex<realT>, wfp::fftwAllocator<std::complex<realT> >, 0> mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::complexImageT

The complex image type.

Definition at line 74 of file simulatedAOSystem.hpp.

◆ imageT

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
typedef Eigen::Array<realT, Eigen::Dynamic, Eigen::Dynamic> mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::imageT

The real image type.

Definition at line 72 of file simulatedAOSystem.hpp.

◆ realT

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
typedef _realT mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::realT

The floating point type used for all calculations.

Definition at line 68 of file simulatedAOSystem.hpp.

◆ wavefrontT

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
typedef mx::AO::sim::wavefront<realT> mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::wavefrontT

The wavefront type.

Definition at line 70 of file simulatedAOSystem.hpp.

Constructor & Destructor Documentation

◆ simulatedAOSystem()

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::simulatedAOSystem

Default c'tor.

Definition at line 296 of file simulatedAOSystem.hpp.

References mx::sys::getEnv().

◆ ~simulatedAOSystem()

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::~simulatedAOSystem

Destructor.

Definition at line 321 of file simulatedAOSystem.hpp.

References mx::ioutils::convertToString(), and mx::fits::fitsFile< dataT >::write().

Member Function Documentation

◆ initSystem()

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
int mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::initSystem ( const std::string &  sysName,
typename dmT::specT &  dmSpec,
const std::string &  wfsName,
const std::string &  pupilName,
const int &  wfSz 
)

Initialize the system.

Initializes the basic parts of the system.

Returns
0 on success
-1 on an error (simulation should not continue if this happens).
Parameters
[in]sysNameSystem name.
[in]dmSpecDM Specification.
[in]wfsNameWFS Name.
[in]pupilNameName of the system pupil.
[in]wfSzSize of the wavefront used for propagation.

Definition at line 356 of file simulatedAOSystem.hpp.

References mx::fits::fitsFile< dataT >::read().

◆ simStep() [1/2]

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
double mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::simStep

Get the simulation step size.

Returns
the current value of m_simStep [sec].

Definition at line 978 of file simulatedAOSystem.hpp.

◆ simStep() [2/2]

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
int mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::simStep ( const double &  ss)

Set the simulation step size.

Units of step size are seconds.

Returns
0 on succces
-1 on error [currently none]
Parameters
[in]ssthe new value of simulation stepsize [sec]

Definition at line 970 of file simulatedAOSystem.hpp.

◆ takeResponseMatrix()

template<typename realT , typename wfsT , typename reconT , typename filterT , typename dmT , typename turbSeqT , typename coronT >
void mx::AO::sim::simulatedAOSystem< realT, wfsT, reconT, filterT, dmT, turbSeqT, coronT >::takeResponseMatrix ( realT  amp,
std::string  rmatName,
int  nmodes = 0 
)

Measure the system response matrix.

System should be initialized with initSystemCal.

Parameters
amp
rmatName
nmodes

Definition at line 479 of file simulatedAOSystem.hpp.

References mx::sys::get_curr_time().

Member Data Documentation

◆ _pupil

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
imageT mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::_pupil

The system pupil. This is generally a binary mask and will be applied at various points in the propagation.

Definition at line 224 of file simulatedAOSystem.hpp.

◆ _pupilMask

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
imageT mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::_pupilMask

A pupil mask which is applied once at the beginning of propagation. Could be apodized and/or different from _pupil.

Definition at line 225 of file simulatedAOSystem.hpp.

◆ _pupilName

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
std::string mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::_pupilName

The pupil name for use in the mx::AO::path.

Definition at line 89 of file simulatedAOSystem.hpp.

◆ _sysName

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
std::string mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::_sysName

The system name for use in mx::AO::path.

Definition at line 87 of file simulatedAOSystem.hpp.

◆ _wfsName

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
std::string mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::_wfsName

The WFS name for use in the mx::AO::path.

Definition at line 88 of file simulatedAOSystem.hpp.

◆ m_saveSz

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
int mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::m_saveSz {0}

Image outputs

Definition at line 158 of file simulatedAOSystem.hpp.

◆ m_simStep

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
realT mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::m_simStep
protected

The simulation step size in seconds.

Definition at line 127 of file simulatedAOSystem.hpp.

◆ m_writeWavefronts

template<typename _realT , typename _wfsT , typename _reconT , typename _filterT , typename _dmT , typename _turbSeqT , typename _coronT >
bool mx::AO::sim::simulatedAOSystem< _realT, _wfsT, _reconT, _filterT, _dmT, _turbSeqT, _coronT >::m_writeWavefronts {true}

Wavefront Outputs

Definition at line 143 of file simulatedAOSystem.hpp.


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