COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
rtcCompass.py
1 
37 
38 from shesha.init.rtc_init import rtc_init
39 from shesha.supervisor.components.sourceCompass import SourceCompass
40 import shesha.constants as scons
41 import numpy as np
42 from typing import Union
43 
44 from shesha.supervisor.components.rtc.rtcAbstract import RtcAbstract, carmaWrap_context
45 
46 
47 class RtcCompass(RtcAbstract):
48  """ RTC handler for compass simulation
49  """
50 
51  def __init__(self, context: carmaWrap_context, config, tel, wfs, dms, atm, *,
52  brahma: bool = False, fp16: bool = False, cacao: bool = False):
53  """ Initialize a RtcCompass component for rtc related supervision
54 
55  Args:
56  context : (carmaContext) : CarmaContext instance
57 
58  config : (config module) : Parameters configuration structure module
59 
60  tel: (Telescope) : Telescope object
61 
62  wfs: (Sensors) : Sensors object
63 
64  dms: (Dms) : Dms object
65 
66  atm: (Atmos) : Atmos object
67 
68  Kwargs:
69  brahma : (bool, optional) : If True, enables BRAHMA features in RTC (Default is False)
70  Requires BRAHMA to be installed
71 
72  fp16 : (bool, optional) : If True, enables FP16 features in RTC (Default is False)
73  Requires CUDA_SM>60 to be installed
74 
75  cacao : (bool) : If True, enables CACAO features in RTC (Default is False)
76  Requires OCTOPUS to be installed
77  """
78  RtcAbstract.__init__(self, context, config, brahma=brahma, fp16=fp16,
79  cacao=cacao)
80  self.rtc_initrtc_initrtc_init(tel, wfs, dms, atm)
81 
82  def rtc_init(self, tel, wfs, dms, atm):
83  """ Initialize a RtcCompass component for rtc related supervision
84 
85  Args:
86  tel: (Telescope) : Telescope object
87 
88  wfs: (Sensors) : Sensors object
89 
90  dms: (Dms) : Dms object
91 
92  atm: (Atmos) : Atmos object
93  """
94  self._rtc_rtc_rtc = rtc_init(self._context_context, tel._tel, wfs._wfs, dms._dms, atm._atmos,
95  self._config_config.p_wfss, self._config_config.p_tel,
96  self._config_config.p_geom, self._config_config.p_atmos,
97  self._config_config.p_loop.ittime, self._config_config.p_centroiders,
98  self._config_config.p_controllers, self._config_config.p_dms,
99  cacao=self.cacaocacao)
cacao
(bool) : CACAO features enabled in the RTC
Definition: rtcAbstract.py:103
RTC handler for compass simulation.
Definition: rtcCompass.py:49
def rtc_init(self, tel, wfs, dms, atm)
Initialize a RtcCompass component for rtc related supervision.
Definition: rtcCompass.py:93
def __init__(self, carmaWrap_context context, config, tel, wfs, dms, atm, *bool brahma=False, bool fp16=False, bool cacao=False)
Initialize a RtcCompass component for rtc related supervision.
Definition: rtcCompass.py:77
Numerical constants for shesha and config enumerations for safe-typing.
Definition: constants.py:1
Initialization of a Rtc object.
Definition: rtc_init.py:1