42 def open_loopSlp(tel: Telescope, atmos: Atmos, wfs: Sensors, rtc: Rtc, nrec: int,
43 ncontrol: int, p_wfss: list):
44 """ Return a set of recorded open-loop slopes, usefull for initialize modal control optimization
48 tel: (Telescope) : Telescope object
50 atmos: (Atmos) : Atmos object
52 wfs: (Sensors) : Sensors object
54 rtc: (Rtc) : Rtc object
56 nrec: (int) : number of samples to record
58 ncontrol: (int) : controller's index
60 p_wfss: (list of Param_wfs) : wfs settings
63 ol_slopes = np.zeros((sum([2 * p_wfss[i]._nvalid
64 for i
in range(len(p_wfss))]), nrec), dtype=np.float32)
66 print(
"Recording " + str(nrec) +
" open-loop slopes...")
70 if (p_wfss
is not None and wfs
is not None):
71 for j
in range(len(p_wfss)):
72 wfs.d_wfs[j].d_gs.raytrace(atmos)
73 wfs.d_wfs[j].d_gs.raytrace(tel)
74 wfs.d_wfs[j].comp_image()
75 rtc.d_centro[j].get_cog()
76 ol_slopes[j * p_wfss[j]._nvalid * 2:(j + 1) * p_wfss[j]._nvalid *
77 2, i] = np.array(wfs.d_wfs[j].d_slopes)