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

Computation implementations of command matrix. More...

Functions

np.ndarray generic_imat_inversion (np.ndarray M2V, np.ndarray modalIMat, np.ndarray modeSelect=None, np.ndarray modeGains=None)
 Generic numpy modal interaction matrix inversion function. More...
 
None cmat_init (int ncontrol, Rtc rtc, conf.Param_controller p_controller, List[conf.Param_wfs] p_wfss, conf.Param_atmos p_atmos, conf.Param_tel p_tel, List[conf.Param_dm] p_dms, int nmodes=0)
 Compute the command matrix on the GPU. More...
 
def svd_for_cmat (D)
 
def Btt_for_cmat (rtc, dms, p_dms, p_geom)
 Compute a command matrix in Btt modal basis (see error breakdown) and set it on the sutra_rtc. More...
 
def get_cmat (D, nfilt, Btt=None, rtc=None, svd=None)
 Compute a command matrix from an interaction matrix 'D'. More...
 

Detailed Description

Computation implementations of command matrix.

Author
COMPASS Team https://github.com/ANR-COMPASS
Version
5.4.4
Date
2022/01/24

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

Copyright (C) 2011-2023 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

◆ Btt_for_cmat()

def shesha.ao.cmats.Btt_for_cmat (   rtc,
  dms,
  p_dms,
  p_geom 
)

Compute a command matrix in Btt modal basis (see error breakdown) and set it on the sutra_rtc.

It computes by itself the volts to Btt matrix.

Parameters
rtc(Rtc) : rtc object
dms(Dms): dms object
p_dms(list of Param_dm): dms settings
p_geom(Param_geom): geometry settings

Definition at line 178 of file cmats.py.

◆ cmat_init()

None shesha.ao.cmats.cmat_init ( int  ncontrol,
Rtc  rtc,
conf.Param_controller  p_controller,
List[conf.Param_wfs]  p_wfss,
conf.Param_atmos  p_atmos,
conf.Param_tel  p_tel,
List[conf.Param_dm]  p_dms,
int   nmodes = 0 
)

Compute the command matrix on the GPU.

Parameters
ncontrol(int) :
rtc(Rtc) :
p_controller(Param_controller) : controller settings
p_wfss(list of Param_wfs) : wfs settings
p_atmos(Param_atmos) : atmos settings
p_tel(Param_tel) : telescope settings
p_dms(list of Param_dm) : dms settings
M2V(np.ndarray[ndim=2, dtype=np.float32]): (optional) KL to volts matrix (for KL cmat)
nmodes(int) : (optional) number of kl modes

Definition at line 104 of file cmats.py.

◆ generic_imat_inversion()

np.ndarray shesha.ao.cmats.generic_imat_inversion ( np.ndarray  M2V,
np.ndarray  modalIMat,
np.ndarray   modeSelect = None,
np.ndarray   modeGains = None 
)

Generic numpy modal interaction matrix inversion function.

Parameters
M2V(nActu x nModes) : modal basis matrix
modalIMat(nSlopes x nModes) : modal interaction matrix
modeSelect(nModes, dtype=bool): (Optional): mode selection, mode at False is filtered
modeGains(nModes, dtype=bool): (Optional): modal gains to apply. These are gain in the reconstruction sens, ie they are applied multiplicatively on the command matrix

Definition at line 67 of file cmats.py.

◆ get_cmat()

def shesha.ao.cmats.get_cmat (   D,
  nfilt,
  Btt = None,
  rtc = None,
  svd = None 
)

Compute a command matrix from an interaction matrix 'D'.

usage:

get_cmat(D,nfilt)
get_cmat(D,nfilt,Btt=BTT,rtc=RTC)
get_cmat(D,nfilt,svd=SVD)
Parameters
D(np.ndarray[ndim=2, dtype=np.float32]): interaction matrix
nfilt(int): number of element to filter
Btt(np.ndarray[ndim=2, dtype=np.float32]): Btt modal basis
rtc(Rtc) :
svd(tuple of np.ndarray[ndim=1, dtype=np.float32): svd of D.T*D (obtained from np.linalg.svd)

Definition at line 209 of file cmats.py.

Here is the call graph for this function:

◆ svd_for_cmat()

def shesha.ao.cmats.svd_for_cmat (   D)

Definition at line 159 of file cmats.py.

Here is the caller graph for this function: