42 """ Telescope handler for compass simulation
45 _tel : (sutraWrap.Tel) : Sutra telescope instance
47 _context : (carmaContext) : CarmaContext instance
49 _config : (config module) : Parameters configuration structure module
53 """ Initialize an AtmosCompass component for atmosphere related supervision
56 context : (carmaContext) : CarmaContext instance
58 config : (config module) : Parameters configuration structure module
62 if self.
_config_config.p_atmos
is not None:
63 r0 = self.
_config_config.p_atmos.r0
65 raise ValueError(
'A r0 value through a Param_atmos is required.')
67 if self.
_config_config.p_loop
is not None:
68 ittime = self.
_config_config.p_loop.ittime
71 'An ittime (iteration time in seconds) value through a Param_loop is required.'
73 print(
"->telescope init")
75 ittime, self.
_config_config.p_wfss)
78 """ Set a circular buffer of phase screens to be raytraced as a
79 Telescope layer. Buffer size shall be (mpup size, mpup size, N).
82 phase : (np.ndarray[ndim=3, dtype=float]) : circular buffer of phase screen
84 if (phase.ndim != 3
or phase.shape[0] != self.
_config_config.p_geom._mpupil.shape[0]
or phase.shape[1] != self.
_config_config.p_geom._mpupil.shape[1]):
85 print(
"Input shall be a np.ndarray of dimensions (mpup size, mpup size, N)")
90 """ Update the index of the current phase screen in the circular buffer, so it passes to the next one
95 """ Reset circular buffer d_input_phase
100 """ Return the circular buffer of telescope phase screens
103 phase : (np.ndarray[ndim=3, dtype=float]) : circular buffer of phase screen
105 if (self.
_tel_tel.d_input_phase
is None):
107 return np.array(self.
_tel_tel.d_input_phase)
110 """ Return the index of the current phase screen to be raytraced inside the telescope circular buffer
113 counter : (int) : Phase screen index in the circular buffer
115 return self.
_tel_tel.input_phase_counter
Telescope handler for compass simulation.
def set_input_phase(self, np.ndarray phase)
Set a circular buffer of phase screens to be raytraced as a Telescope layer.
def __init__(self, context, config)
Initialize an AtmosCompass component for atmosphere related supervision.
def get_input_phase(self)
Return the circular buffer of telescope phase screens.
def update_input_phase(self)
Update the index of the current phase screen in the circular buffer, so it passes to the next one.
def reset_input_phase(self)
Reset circular buffer d_input_phase.
def get_input_phase_counter(self)
Return the index of the current phase screen to be raytraced inside the telescope circular buffer.
Initialization of the system geometry and of the Telescope object.