COMPASS  5.4.4
End-to-end AO simulation tool using GPU acceleration
rtcStandalone.py
1 
37 from shesha.init.rtc_init import rtc_standalone
38 from shesha.supervisor.components.sourceCompass import SourceCompass
39 import shesha.constants as scons
40 import numpy as np
41 from typing import Union
42 
43 from shesha.supervisor.components.rtc.rtcAbstract import RtcAbstract, carmaWrap_context
44 
45 
47  """ RTC handler for compass standalone
48  """
49 
50  def __init__(self, context: carmaWrap_context, config, nwfs: int, nvalid: list,
51  nactu: int, centroider_type: list, delay: list, offset: list,
52  scale: list, *, brahma: bool = False, fp16: bool = False,
53  cacao: bool = False):
54  """ Initialize a RtcStandalone component for rtc related supervision
55 
56  Args:
57  context : (carmaContext) : CarmaContext instance
58 
59  config : (config module) : Parameters configuration structure module
60 
61  nwfs: (int): number of wavefront sensors
62 
63  nvalid: (int): number of valid measures as input
64 
65  nactu: (int): number of actuators as output
66 
67  centroider_type: (list): type of centroiders
68 
69  delay: (list): delay of each controller
70 
71  offset: (list): offset added in the cog computation of each WFS
72 
73  scale: (list): scale factor used in the cog computation of each WFS
74 
75  Kwargs:
76  brahma : (bool, optional) : If True, enables BRAHMA features in RTC (Default is False)
77  Requires BRAHMA to be installed
78 
79  fp16 : (bool, optional) : If True, enables FP16 features in RTC (Default is False)
80  Requires CUDA_SM>60 to be installed
81 
82  cacao : (bool) : If True, enables CACAO features in RTC (Default is False)
83  Requires OCTOPUS to be installed
84  """
85  RtcAbstract.__init__(self, context, config, brahma=brahma, fp16=fp16,
86  cacao=cacao)
87 
88  self.rtc_initrtc_initrtc_init(nwfs, nvalid, nactu, centroider_type, delay, offset, scale)
89 
90  def rtc_init(self, nwfs: int, nvalid: list, nactu: int, centroider_type: list,
91  delay: list, offset: list, scale: list):
92  """ Initialize a RtcStandalone component for rtc related supervision
93 
94  Args:
95  nwfs: (int): number of wavefront sensors
96 
97  nvalid: (int): number of valid measures as input
98 
99  nactu: (int): number of actuators as output
100 
101  centroider_type: (list): type of centroiders
102 
103  delay: (list): delay of each controller
104 
105  offset: (list): offset added in the cog computation of each WFS
106 
107  scale: (list): scale factor used in the cog computation of each WFS
108  """
109  self._rtc_rtc_rtc = rtc_standalone(self._context_context, nwfs, nvalid, nactu, centroider_type,
110  delay, offset, scale, brahma=self.brahmabrahma,
111  fp16=self.fp16fp16, cacao=self.cacaocacao)
brahma
(bool) : BRAHMA features enabled in the RTC
Definition: rtcAbstract.py:101
cacao
(bool) : CACAO features enabled in the RTC
Definition: rtcAbstract.py:103
fp16
(bool) : FP16 features enabled in the RTC
Definition: rtcAbstract.py:102
def rtc_init(self, int nwfs, list nvalid, int nactu, list centroider_type, list delay, list offset, list scale)
Initialize a RtcStandalone component for rtc related supervision.
def __init__(self, carmaWrap_context context, config, int nwfs, list nvalid, int nactu, list centroider_type, list delay, list offset, list scale, *bool brahma=False, bool fp16=False, bool cacao=False)
Initialize a RtcStandalone component for rtc related supervision.
Numerical constants for shesha and config enumerations for safe-typing.
Definition: constants.py:1
Initialization of a Rtc object.
Definition: rtc_init.py:1