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

Imported from CANARY. More...

Functions

def clr (*figs)
 THE Fab function. More...
 
def system (cmd, output=False)
 Execute the external command. More...
 
def pli (data, color='gist_earth', cmin=9998, cmax=9998, win=1, origin=None, aspect='equal')
 plots the transpose of the data More...
 
def binning (w, footprint)
 
def minmax (tab)
 
def plg (data, x="", win=1, xlog=0, ylog=0, color="black")
 
def zcen (data)
 
def getValidSubapArray (nssp, rext, rint, return2d=False)
 
def plpyr (slopesvector, validArray)
 
def plsh (slopesvector, nssp, validint, sparta=False, invertxy=False, returnquiver=False)
 <slopesvector> is the input vector of slopes <nssp> is the number of subapertures in the diameter of the pupil <validint> is the normalized diameter of central obscuration (between 0 and 1.00) <sparta> when==1, slopes are ordered xyxyxyxy... More...
 
def pl3d (im)
 
def FFThz (signal, fe, freq=0)
 PSD = FFThz( signal, fe ) OU f = FFThz( 1024, fe, freq=1 ) On the first form, returns the power spectral density of signal. More...
 
def computePSD (zerall, fe, izerNum, wfsNum)
 
def countExample (seconds)
 
def plotSubapRectangles (pup, isvalid, istart, jstart)
 

Detailed Description

Imported from CANARY.

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

◆ binning()

def shesha.util.tools.binning (   w,
  footprint 
)

Definition at line 127 of file tools.py.

◆ clr()

def shesha.util.tools.clr ( figs)

THE Fab function.

clears the current figure (no arg) or specified window

Definition at line 56 of file tools.py.

◆ computePSD()

def shesha.util.tools.computePSD (   zerall,
  fe,
  izerNum,
  wfsNum 
)

Definition at line 362 of file tools.py.

Here is the call graph for this function:

◆ countExample()

def shesha.util.tools.countExample (   seconds)

Definition at line 378 of file tools.py.

◆ FFThz()

def shesha.util.tools.FFThz (   signal,
  fe,
  freq = 0 
)

PSD = FFThz( signal, fe ) OU f = FFThz( 1024, fe, freq=1 ) On the first form, returns the power spectral density of signal.

If signal has units 'u', the PSD has units 'u^2/Hz'. The frequency axis can be get by using the keyword freq=1.

Definition at line 349 of file tools.py.

Here is the caller graph for this function:

◆ getValidSubapArray()

def shesha.util.tools.getValidSubapArray (   nssp,
  rext,
  rint,
  return2d = False 
)

Definition at line 207 of file tools.py.

Here is the call graph for this function:

◆ minmax()

def shesha.util.tools.minmax (   tab)

Definition at line 140 of file tools.py.

◆ pl3d()

def shesha.util.tools.pl3d (   im)
ir = pyfits.get_data("/home/fvidal/data/Run2015/June2015_27_onsky/ir/ir_2015-06-28_06h27m40s_script44_gain.fits")

JAMAIS TESTEE !!!!!!!!!!!!!!

Definition at line 336 of file tools.py.

◆ plg()

def shesha.util.tools.plg (   data,
  x = "",
  win = 1,
  xlog = 0,
  ylog = 0,
  color = "black" 
)
color = "green"

color = "0.71" [0-1] gray scale

color = '#eeefff'

http://matplotlib.org/api/colors_api.html

Definition at line 160 of file tools.py.

◆ pli()

def shesha.util.tools.pli (   data,
  color = 'gist_earth',
  cmin = 9998,
  cmax = 9998,
  win = 1,
  origin = None,
  aspect = 'equal' 
)

plots the transpose of the data

color maps keywords can be found in http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps

Definition at line 105 of file tools.py.

◆ plotSubapRectangles()

def shesha.util.tools.plotSubapRectangles (   pup,
  isvalid,
  istart,
  jstart 
)

Definition at line 386 of file tools.py.

◆ plpyr()

def shesha.util.tools.plpyr (   slopesvector,
  validArray 
)
wao.config.p_wfss[0]._isvalid

Definition at line 266 of file tools.py.

◆ plsh()

def shesha.util.tools.plsh (   slopesvector,
  nssp,
  validint,
  sparta = False,
  invertxy = False,
  returnquiver = False 
)

<slopesvector> is the input vector of slopes <nssp> is the number of subapertures in the diameter of the pupil <validint> is the normalized diameter of central obscuration (between 0 and 1.00) <sparta> when==1, slopes are ordered xyxyxyxy...

when==0, slopes are xxxxxxyyyyyyy <xy> when==1, swap x and y. Does nothing special when xy==0.

The routine plots a field vector of subaperture gradients defined in vector <slopesvector>. The routine automatically adjusts/finds what are the valid subapertures for plotting, depending on the number of elements in <slopesvector>. Only the devalidated subapertures inside the central obscuration cannot be known, that’s why <validint> has to be passed in the argument list.

Definition at line 288 of file tools.py.

◆ system()

def shesha.util.tools.system (   cmd,
  output = False 
)

Execute the external command.

system("ls")
out = system("ls", out=True)
out = system("ls -l", out=True)

and get its stdout exitcode and stderr.

Definition at line 81 of file tools.py.

◆ zcen()

def shesha.util.tools.zcen (   data)

Definition at line 195 of file tools.py.

Here is the caller graph for this function: