mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::AO::sim::turbSubHarmonic< _turbAtmosphereT > Class Template Reference

template<typename _turbAtmosphereT>
class mx::AO::sim::turbSubHarmonic< _turbAtmosphereT >

A class to manage low-frequency sub-harmonic phase screen generation in atmospheric turbulence.

Implements the method of Johansson and Gavel (1994)[11]. This is needed to generate adequate tip/tilt variance with large outer scales.

Definition at line 57 of file turbSubHarmonic.hpp.

#include <ao/sim/turbSubHarmonic.hpp>

Public Member Functions

Construction
 turbSubHarmonic ()
 
Configuration
void turbAtmo (turbAtmosphereT *atm)
 Set the pointer to the turbulent atmosphere. More...
 
turbAtmosphereT * turbAtmo ()
 Get the pointer to the AO atmosphere. More...
 
void level (uint32_t ml)
 Set the subharmonic level to apply. More...
 
uint32_t level ()
 Get the subharmonic level. More...
 
void preCalc (bool pc)
 Set whether or not to pre-calculate the modes. More...
 
bool preCalc ()
 Get whether or not the modes are pre-calculated. More...
 
Screen Generation
void initGrid (uint32_t layerNo)
 
void screen (improc::eigenImage< realT > &scrn)
 
void deinit ()
 Deallocate memory. More...
 

Protected Attributes

Configuration Parameters
turbAtmosphereT * m_turbAtmo {nullptr}
 
unsigned m_level {1}
 The subharmonic level to apply. More...
 
bool m_preCalc {false}
 whether or not the modes are pre-calculated. More...
 
Internal State
uint32_t m_scrnSz
 The wavefront screen size from the layer being simulated. More...
 
std::vector< realT > m_noise
 
std::vector< realT > m_m
 
std::vector< realT > m_n
 
std::vector< realT > m_sqrtPSD
 
improc::eigenCube< realT > m_modes
 the pre-calculated modes More...
 

Member Function Documentation

◆ deinit()

template<typename turbAtmosphereT >
void mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::deinit

Deallocate memory.

Definition at line 386 of file turbSubHarmonic.hpp.

◆ level() [1/2]

template<typename turbAtmosphereT >
uint32_t mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::level

Get the subharmonic level.

Returns
the current subharmonic level

Definition at line 176 of file turbSubHarmonic.hpp.

◆ level() [2/2]

template<typename turbAtmosphereT >
void mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::level ( uint32_t  ml)

Set the subharmonic level to apply.

Parameters
[in]mlthe new level

Definition at line 170 of file turbSubHarmonic.hpp.

◆ preCalc() [1/2]

template<typename turbAtmosphereT >
bool mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::preCalc

Get whether or not the modes are pre-calculated.

Returns
the current value of the preCalc flag

Definition at line 188 of file turbSubHarmonic.hpp.

◆ preCalc() [2/2]

template<typename turbAtmosphereT >
void mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::preCalc ( bool  pc)

Set whether or not to pre-calculate the modes.

Parameters
[in]pcthe new value of the preCalc flag

Definition at line 182 of file turbSubHarmonic.hpp.

◆ turbAtmo() [1/2]

template<typename turbAtmosphereT >
turbAtmosphereT * mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::turbAtmo

Get the pointer to the AO atmosphere.

Returns
the the current pointer to the AO atmosphere

Definition at line 164 of file turbSubHarmonic.hpp.

◆ turbAtmo() [2/2]

template<typename turbAtmosphereT >
void mx::AO::sim::turbSubHarmonic< turbAtmosphereT >::turbAtmo ( turbAtmosphereT *  atm)

Set the pointer to the turbulent atmosphere.

Parameters
[in]atmthe new pointer to an AO atmosphere

Definition at line 158 of file turbSubHarmonic.hpp.

Member Data Documentation

◆ m_level

template<typename _turbAtmosphereT >
unsigned mx::AO::sim::turbSubHarmonic< _turbAtmosphereT >::m_level {1}
protected

The subharmonic level to apply.

Definition at line 73 of file turbSubHarmonic.hpp.

◆ m_modes

template<typename _turbAtmosphereT >
improc::eigenCube<realT> mx::AO::sim::turbSubHarmonic< _turbAtmosphereT >::m_modes
protected

the pre-calculated modes

Definition at line 92 of file turbSubHarmonic.hpp.

◆ m_preCalc

template<typename _turbAtmosphereT >
bool mx::AO::sim::turbSubHarmonic< _turbAtmosphereT >::m_preCalc {false}
protected

whether or not the modes are pre-calculated.

Definition at line 75 of file turbSubHarmonic.hpp.

◆ m_scrnSz

template<typename _turbAtmosphereT >
uint32_t mx::AO::sim::turbSubHarmonic< _turbAtmosphereT >::m_scrnSz
protected

The wavefront screen size from the layer being simulated.

Definition at line 83 of file turbSubHarmonic.hpp.


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