COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
test_fp16 Namespace Reference

Functions

def goAhead ()
 
def loop (niter)
 

Variables

int precision = 1e-2
 
 sup
 
 delay
 
 sup2
 
 rtc = Rtc()
 
 idx_centro
 
 ncentro
 
 centro = rtc.d_centro[0]
 
 control = rtc.d_control[0]
 
 xvalid = np.array(sup.rtc.rtc.d_centro[0].d_validx)
 
 yvalid = np.array(sup.rtc.rtc.d_centro[0].d_validy)
 
 cmat = sup.rtc.get_command_matrix(0)
 
list SR32 = []
 
list SR16 = []
 

Function Documentation

◆ goAhead()

def test_fp16.goAhead ( )

Definition at line 49 of file test_fp16.py.

49 def goAhead():
50  sup.next()
51  sup2.single_next()
52  sup.dms.set_command(np.array(sup._sim.rtc.d_control[0].d_voltage))
53  sup._sim.raytraceTar(0, "all")
54  sup._sim.comp_tar_image(0,compLE=False)
55  sup._sim.compStrehl(0)
56  SR32.append(sup.get_strehl(0)[0])
57  frame = sup2.get_wfs_image(0)
58  frame /= frame.max()
59  rtc.d_centro[0].load_img(frame, frame.shape[0])
60  rtc.d_centro[0].calibrate_img()
61  rtc.do_centroids(0)
62  rtc.do_control(0)
63  rtc.comp_voltage(0)
64  sup2.dms.set_command(np.array(rtc.d_control[0].d_voltage))
65  sup2._sim.raytraceTar(0, "all")
66  sup2._sim.comp_tar_image(0,compLE=False)
67  sup2._sim.compStrehl(0)
68  SR16.append(sup2.get_strehl(0)[0])
69 
Here is the caller graph for this function:

◆ loop()

def test_fp16.loop (   niter)

Definition at line 70 of file test_fp16.py.

70 def loop(niter):
71  for _ in tqdm(range(niter)):
72  goAhead()
Here is the call graph for this function:

Variable Documentation

◆ centro

test_fp16.centro = rtc.d_centro[0]

Definition at line 30 of file test_fp16.py.

◆ cmat

test_fp16.cmat = sup.rtc.get_command_matrix(0)

Definition at line 36 of file test_fp16.py.

◆ control

test_fp16.control = rtc.d_control[0]

Definition at line 31 of file test_fp16.py.

◆ delay

test_fp16.delay

Definition at line 12 of file test_fp16.py.

◆ idx_centro

test_fp16.idx_centro

Definition at line 29 of file test_fp16.py.

◆ ncentro

test_fp16.ncentro

Definition at line 29 of file test_fp16.py.

◆ precision

int test_fp16.precision = 1e-2

Definition at line 9 of file test_fp16.py.

◆ rtc

test_fp16.rtc = Rtc()

Definition at line 24 of file test_fp16.py.

◆ SR16

list test_fp16.SR16 = []

Definition at line 47 of file test_fp16.py.

◆ SR32

list test_fp16.SR32 = []

Definition at line 46 of file test_fp16.py.

◆ sup

test_fp16.sup
Initial value:
1 = Supervisor(
2  os.getenv("COMPASS_ROOT") + "/shesha/data/par/par4bench/scao_sh_16x16_8pix.py")

Definition at line 10 of file test_fp16.py.

◆ sup2

test_fp16.sup2
Initial value:
1 = Supervisor(
2  os.getenv("COMPASS_ROOT") + "/shesha/data/par/par4bench/scao_sh_16x16_8pix.py")

Definition at line 17 of file test_fp16.py.

◆ xvalid

test_fp16.xvalid = np.array(sup.rtc.rtc.d_centro[0].d_validx)

Definition at line 33 of file test_fp16.py.

◆ yvalid

test_fp16.yvalid = np.array(sup.rtc.rtc.d_centro[0].d_validy)

Definition at line 34 of file test_fp16.py.