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

Functions used for modal optimization control. More...

Functions

def open_loopSlp (Telescope tel, Atmos atmos, Sensors wfs, Rtc rtc, int nrec, int ncontrol, list p_wfss)
 Return a set of recorded open-loop slopes, usefull for initialize modal control optimization. More...
 

Detailed Description

Functions used for modal optimization control.

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.0.0
Date
2020/05/18

This file is part of COMPASS https://anr-compass.github.io/compass/

Copyright (C) 2011-2019 COMPASS Team https://github.com/ANR-COMPASS All rights reserved. Distributed under GNU - LGPL

COMPASS is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

COMPASS: End-to-end AO simulation tool using GPU acceleration The COMPASS platform was designed to meet the need of high-performance for the simulation of AO systems.

The final product includes a software package for simulating all the critical subcomponents of AO, particularly in the context of the ELT and a real-time core based on several control approaches, with performances consistent with its integration into an instrument. Taking advantage of the specific hardware architecture of the GPU, the COMPASS tool allows to achieve adequate execution speeds to conduct large simulation campaigns called to the ELT.

The COMPASS platform can be used to carry a wide variety of simulations to both testspecific components of AO of the E-ELT (such as wavefront analysis device with a pyramid or elongated Laser star), and various systems configurations such as multi-conjugate AO.

COMPASS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with COMPASS. If not, see https://www.gnu.org/licenses/lgpl-3.0.txt.

Function Documentation

◆ open_loopSlp()

def shesha.ao.modopti.open_loopSlp ( Telescope  tel,
Atmos  atmos,
Sensors  wfs,
Rtc  rtc,
int  nrec,
int  ncontrol,
list  p_wfss 
)

Return a set of recorded open-loop slopes, usefull for initialize modal control optimization.

:parameters:

tel (Telescope) : Telescope object

atmos (Atmos) : Atmos object

wfs (Sensors) : Sensors object

rtc (Rtc) : Rtc object

nrec (int) : number of samples to record

ncontrol (int) : controller's index

p_wfss (list of Param_wfs) : wfs settings

Definition at line 60 of file modopti.py.

60  p_wfss: (list of Param_wfs) : wfs settings
61  """
62  # TEST IT
63  ol_slopes = np.zeros((sum([2 * p_wfss[i]._nvalid
64  for i in range(len(p_wfss))]), nrec), dtype=np.float32)
65 
66  print("Recording " + str(nrec) + " open-loop slopes...")
67  for i in range(nrec):
68  atmos.move_atmos()
69 
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)
78  print("Done")
79  return ol_slopes