COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
shesha.sutra_wrap Namespace Reference

Functions

def smart_import (mod, cls, verbose=False, silent=False)
 

Variables

def carmaWrap_context = smart_import("carmaWrap", "context")
 
def Dms = smart_import("sutraWrap", "Dms")
 
def Rtc_FFF = smart_import("sutraWrap", "Rtc_FFF")
 
def Rtc_FHF = smart_import("sutraWrap", "Rtc_FHF", silent=True)
 
def Rtc_UFF = smart_import("sutraWrap", "Rtc_UFF", silent=True)
 
def Rtc_UHF = smart_import("sutraWrap", "Rtc_UHF", silent=True)
 
def Rtc_FFU = smart_import("sutraWrap", "Rtc_FFU", silent=True)
 
def Rtc_FHU = smart_import("sutraWrap", "Rtc_FHU", silent=True)
 
def Rtc_UFU = smart_import("sutraWrap", "Rtc_UFU", silent=True)
 
def Rtc_UHU = smart_import("sutraWrap", "Rtc_UHU", silent=True)
 
def Rtc_brahma = smart_import("sutraWrap", "Rtc_brahma", silent=True)
 
def Rtc_cacao_FFF = smart_import("sutraWrap", "Rtc_cacao_FFF", silent=True)
 
def Rtc_cacao_UFF = smart_import("sutraWrap", "Rtc_cacao_UFF", silent=True)
 
def Rtc_cacao_FFU = smart_import("sutraWrap", "Rtc_cacao_FFU", silent=True)
 
def Rtc_cacao_UFU = smart_import("sutraWrap", "Rtc_cacao_UFU", silent=True)
 
def Rtc_cacao_FHF = smart_import("sutraWrap", "Rtc_cacao_FHF", silent=True)
 
def Rtc_cacao_UHF = smart_import("sutraWrap", "Rtc_cacao_UHF", silent=True)
 
def Rtc_cacao_FHU = smart_import("sutraWrap", "Rtc_cacao_FHU", silent=True)
 
def Rtc_cacao_UHU = smart_import("sutraWrap", "Rtc_cacao_UHU", silent=True)
 
def Sensors = smart_import("sutraWrap", "Sensors")
 
def Atmos = smart_import("sutraWrap", "Atmos")
 
def Telescope = smart_import("sutraWrap", "Telescope")
 
def Target = smart_import("sutraWrap", "Target")
 
def Target_brahma = smart_import("sutraWrap", "Target_brahma", silent=True)
 
def Gamora = smart_import("sutraWrap", "Gamora")
 
def Groot = smart_import("sutraWrap", "Groot")
 

Function Documentation

◆ smart_import()

def shesha.sutra_wrap.smart_import (   mod,
  cls,
  verbose = False,
  silent = False 
)

Definition at line 4 of file sutra_wrap.py.

4 def smart_import(mod, cls, verbose=False, silent=False):
5  try:
6  if verbose:
7  print("trying from " + mod + " import " + cls)
8  # my_module = __import__(mod, globals(), locals(), [cls], 0)
9  my_module = importlib.import_module(mod)
10  return getattr(my_module, cls)
11 
12  except ImportError as err:
13  if not silent:
14  import warnings
15  warnings.warn(
16  "Error importing %s, it will be simulated due to: %s" %
17  (cls, err.msg), Warning)
18 
19  class tmp_cls:
20 
21  def __init__(self, *args, **kwargs):
22  raise RuntimeError("Can not initilize the simulation with fake objects")
23 
24  return tmp_cls
25 
26  except AttributeError as err:
27  if not silent:
28  import warnings
29  warnings.warn(
30  "Error importing %s, it will be simulated due to: %s" %
31  (cls, err.args), Warning)
32 
33  class tmp_cls:
34 
35  def __init__(self, *args, **kwargs):
36  raise RuntimeError("Can not initialize the simulation with fake objects")
37 
38  return tmp_cls
39 
40 
41 # The import of carmaWrap MUST be done first
42 # since MAGMA >= 2.5.0
43 # Otherwise, it causes huge memory leak
44 # plus not working code
45 # Why ? We don't know... TB check with further version of MAGMA

Variable Documentation

◆ Atmos

def shesha.sutra_wrap.Atmos = smart_import("sutraWrap", "Atmos")

Definition at line 67 of file sutra_wrap.py.

◆ carmaWrap_context

def shesha.sutra_wrap.carmaWrap_context = smart_import("carmaWrap", "context")

Definition at line 46 of file sutra_wrap.py.

◆ Dms

def shesha.sutra_wrap.Dms = smart_import("sutraWrap", "Dms")

Definition at line 48 of file sutra_wrap.py.

◆ Gamora

def shesha.sutra_wrap.Gamora = smart_import("sutraWrap", "Gamora")

Definition at line 71 of file sutra_wrap.py.

◆ Groot

def shesha.sutra_wrap.Groot = smart_import("sutraWrap", "Groot")

Definition at line 72 of file sutra_wrap.py.

◆ Rtc_brahma

def shesha.sutra_wrap.Rtc_brahma = smart_import("sutraWrap", "Rtc_brahma", silent=True)

Definition at line 57 of file sutra_wrap.py.

◆ Rtc_cacao_FFF

def shesha.sutra_wrap.Rtc_cacao_FFF = smart_import("sutraWrap", "Rtc_cacao_FFF", silent=True)

Definition at line 58 of file sutra_wrap.py.

◆ Rtc_cacao_FFU

def shesha.sutra_wrap.Rtc_cacao_FFU = smart_import("sutraWrap", "Rtc_cacao_FFU", silent=True)

Definition at line 60 of file sutra_wrap.py.

◆ Rtc_cacao_FHF

def shesha.sutra_wrap.Rtc_cacao_FHF = smart_import("sutraWrap", "Rtc_cacao_FHF", silent=True)

Definition at line 62 of file sutra_wrap.py.

◆ Rtc_cacao_FHU

def shesha.sutra_wrap.Rtc_cacao_FHU = smart_import("sutraWrap", "Rtc_cacao_FHU", silent=True)

Definition at line 64 of file sutra_wrap.py.

◆ Rtc_cacao_UFF

def shesha.sutra_wrap.Rtc_cacao_UFF = smart_import("sutraWrap", "Rtc_cacao_UFF", silent=True)

Definition at line 59 of file sutra_wrap.py.

◆ Rtc_cacao_UFU

def shesha.sutra_wrap.Rtc_cacao_UFU = smart_import("sutraWrap", "Rtc_cacao_UFU", silent=True)

Definition at line 61 of file sutra_wrap.py.

◆ Rtc_cacao_UHF

def shesha.sutra_wrap.Rtc_cacao_UHF = smart_import("sutraWrap", "Rtc_cacao_UHF", silent=True)

Definition at line 63 of file sutra_wrap.py.

◆ Rtc_cacao_UHU

def shesha.sutra_wrap.Rtc_cacao_UHU = smart_import("sutraWrap", "Rtc_cacao_UHU", silent=True)

Definition at line 65 of file sutra_wrap.py.

◆ Rtc_FFF

def shesha.sutra_wrap.Rtc_FFF = smart_import("sutraWrap", "Rtc_FFF")

Definition at line 49 of file sutra_wrap.py.

◆ Rtc_FFU

def shesha.sutra_wrap.Rtc_FFU = smart_import("sutraWrap", "Rtc_FFU", silent=True)

Definition at line 53 of file sutra_wrap.py.

◆ Rtc_FHF

def shesha.sutra_wrap.Rtc_FHF = smart_import("sutraWrap", "Rtc_FHF", silent=True)

Definition at line 50 of file sutra_wrap.py.

◆ Rtc_FHU

def shesha.sutra_wrap.Rtc_FHU = smart_import("sutraWrap", "Rtc_FHU", silent=True)

Definition at line 54 of file sutra_wrap.py.

◆ Rtc_UFF

def shesha.sutra_wrap.Rtc_UFF = smart_import("sutraWrap", "Rtc_UFF", silent=True)

Definition at line 51 of file sutra_wrap.py.

◆ Rtc_UFU

def shesha.sutra_wrap.Rtc_UFU = smart_import("sutraWrap", "Rtc_UFU", silent=True)

Definition at line 55 of file sutra_wrap.py.

◆ Rtc_UHF

def shesha.sutra_wrap.Rtc_UHF = smart_import("sutraWrap", "Rtc_UHF", silent=True)

Definition at line 52 of file sutra_wrap.py.

◆ Rtc_UHU

def shesha.sutra_wrap.Rtc_UHU = smart_import("sutraWrap", "Rtc_UHU", silent=True)

Definition at line 56 of file sutra_wrap.py.

◆ Sensors

def shesha.sutra_wrap.Sensors = smart_import("sutraWrap", "Sensors")

Definition at line 66 of file sutra_wrap.py.

◆ Target

def shesha.sutra_wrap.Target = smart_import("sutraWrap", "Target")

Definition at line 69 of file sutra_wrap.py.

◆ Target_brahma

def shesha.sutra_wrap.Target_brahma = smart_import("sutraWrap", "Target_brahma", silent=True)

Definition at line 70 of file sutra_wrap.py.

◆ Telescope

def shesha.sutra_wrap.Telescope = smart_import("sutraWrap", "Telescope")

Definition at line 68 of file sutra_wrap.py.