![]() |
COMPASS
5.4.4
End-to-end AO simulation tool using GPU acceleration
|
Initialization of the system geometry and of the Telescope object. More...
Functions | |
def | tel_init (carmaWrap_context context, conf.Param_geom p_geom, conf.Param_tel p_tel, r0=None, ittime=None, p_wfss=None, dm=None) |
Initialize the overall geometry of the AO system, including pupil and WFS. More... | |
def | init_wfs_geom (conf.Param_wfs p_wfs, float r0, conf.Param_tel p_tel, conf.Param_geom p_geom, float ittime, verbose=1) |
Compute the geometry of WFSs: valid subaps, positions of the subaps, flux per subap, etc... More... | |
def | init_wfs_size (conf.Param_wfs p_wfs, float r0, conf.Param_tel p_tel, verbose=1) |
Compute all the parameters usefull for further WFS image computation (array sizes) More... | |
def | compute_nphotons (wfs_type, ittime, optthroughput, diam, cobs=0, nxsub=0, zerop=0, gsmag=0, lgsreturnperwatt=0, laserpower=0, verbose=1) |
Determines the number of photons TBC. More... | |
def | init_pyrhr_geom (conf.Param_wfs p_wfs, float r0, conf.Param_tel p_tel, conf.Param_geom p_geom, float ittime, bool verbose=True) |
Compute the geometry of PYRHR WFSs: valid subaps, positions of the subaps, flux per subap, etc... More... | |
def | init_sh_geom (conf.Param_wfs p_wfs, float r0, conf.Param_tel p_tel, conf.Param_geom p_geom, float ittime, bool verbose=True) |
Compute the geometry of SH WFSs: valid subaps, positions of the subaps, flux per subap, etc... More... | |
def | geom_init (conf.Param_geom p_geom, conf.Param_tel p_tel, padding=2) |
Initialize the system geometry. More... | |
def | geom_init_generic (p_geom, pupdiam, t_spiders=0.01, spiders_type="six", xc=0, yc=0, real=0, cobs=0) |
Initialize the system geometry. More... | |
def | pad_array (A, N) |
Initialization of the system geometry and of the Telescope object.
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.
def shesha.init.geom_init.compute_nphotons | ( | wfs_type, | |
ittime, | |||
optthroughput, | |||
diam, | |||
cobs = 0 , |
|||
nxsub = 0 , |
|||
zerop = 0 , |
|||
gsmag = 0 , |
|||
lgsreturnperwatt = 0 , |
|||
laserpower = 0 , |
|||
verbose = 1 |
|||
) |
Determines the number of photons TBC.
wfs_type | (scons.WFSType) : wfs type: SH or PYRHR. |
ittime | (float) : 1/loop frequency [s]. |
optthroughput | (float) : wfs global throughput. |
diam | (float) : telescope diameter. |
cobs | (float) : (optional for SH) telescope central obstruction. |
nxsub | (int) : (optional for PYRHR) linear number of subaps. |
zerop | (float) : (optional for LGS) detector zero point expressed in ph/m**2/s in the bandwidth of the WFS. |
gsmag | (float) : (optional for LGS) magnitude of guide star. |
lgsreturnperwatt | (float) : (optional for NGS) return per watt factor (high season : 10 ph/cm2/s/W). |
laserpower | (float) : (optional for NGS) laser power in W. |
verbose | (bool) : (optional) display informations if True. |
for PYRHR WFS: nphotons = compute_nphotons(scons.WFSType.PYRHR, ittime, optthroughput, diam, cobs=?, zerop=?, gsmag=?) for NGS SH WFS: nphotons = compute_nphotons(scons.WFSType.SH, ittime, optthroughput, diam, nxsub=?, zerop=?, gsmag=?) for LGS SH WFS: nphotons = compute_nphotons(scons.WFSType.SH, ittime, optthroughput, diam, nxsub=?, lgsreturnperwatt=?, laserpower=?)
Definition at line 395 of file geom_init.py.
def shesha.init.geom_init.geom_init | ( | conf.Param_geom | p_geom, |
conf.Param_tel | p_tel, | ||
padding = 2 |
|||
) |
Initialize the system geometry.
p_geom | (Param_geom) : geometry settings |
p_tel | (Param_tel) : telescope settings |
padding | (optional) : padding factor for PYRHR geometry |
Definition at line 913 of file geom_init.py.
def shesha.init.geom_init.geom_init_generic | ( | p_geom, | |
pupdiam, | |||
t_spiders = 0.01 , |
|||
spiders_type = "six" , |
|||
xc = 0 , |
|||
yc = 0 , |
|||
real = 0 , |
|||
cobs = 0 |
|||
) |
Initialize the system geometry.
pupdiam | (long) : linear size of total pupil |
t_spiders | (float) : secondary supports ratio. |
spiders_type | (str) : secondary supports type: "four" or "six". |
xc | (int) |
yc | (int) |
real | (int) |
cobs | (float) : central obstruction ratio. |
Definition at line 980 of file geom_init.py.
def shesha.init.geom_init.init_pyrhr_geom | ( | conf.Param_wfs | p_wfs, |
float | r0, | ||
conf.Param_tel | p_tel, | ||
conf.Param_geom | p_geom, | ||
float | ittime, | ||
bool | verbose = True |
||
) |
Compute the geometry of PYRHR WFSs: valid subaps, positions of the subaps, flux per subap, etc...
p_wfs | (Param_wfs) : wfs settings |
r0 | (float) : atmos r0 @ 0.5 microns |
p_tel | (Param_tel) : telescope settings |
geom | (Param_geom) : geom settings |
ittime | (float) : 1/loop frequency [s] |
verbose | (bool) : (optional) display informations if True |
Definition at line 446 of file geom_init.py.
def shesha.init.geom_init.init_sh_geom | ( | conf.Param_wfs | p_wfs, |
float | r0, | ||
conf.Param_tel | p_tel, | ||
conf.Param_geom | p_geom, | ||
float | ittime, | ||
bool | verbose = True |
||
) |
Compute the geometry of SH WFSs: valid subaps, positions of the subaps, flux per subap, etc...
p_wfs | (Param_wfs) : wfs settings |
r0 | (float) : atmos r0 @ 0.5 microns |
p_tel | (Param_tel) : telescope settings |
geom | (Param_geom) : geom settings |
ittime | (float) : 1/loop frequency [s] |
verbose | (bool) : (optional) display informations if True |
Definition at line 683 of file geom_init.py.
def shesha.init.geom_init.init_wfs_geom | ( | conf.Param_wfs | p_wfs, |
float | r0, | ||
conf.Param_tel | p_tel, | ||
conf.Param_geom | p_geom, | ||
float | ittime, | ||
verbose = 1 |
|||
) |
Compute the geometry of WFSs: valid subaps, positions of the subaps, flux per subap, etc...
p_wfs | (Param_wfs) : wfs settings |
r0 | (float) : atmos r0 @ 0.5 microns |
p_tel | (Param_tel) : telescope settings |
geom | (Param_geom) : geom settings |
ittime | (float) : 1/loop frequency [s] |
verbose | (int) : (optional) display informations if 0 |
Definition at line 137 of file geom_init.py.
def shesha.init.geom_init.init_wfs_size | ( | conf.Param_wfs | p_wfs, |
float | r0, | ||
conf.Param_tel | p_tel, | ||
verbose = 1 |
|||
) |
Compute all the parameters usefull for further WFS image computation (array sizes)
p_wfs | (Param_wfs) : wfs settings |
r0 | (float) : atmos r0 @ 0.5 microns |
p_tel | (Param_tel) : telescope settings |
verbose | (int) : (optional) display informations if 0 |
Scheme to determine arrays sizes sh :
n = int(2*d*v/lambda/CONST.RAD2ARCSEC)+1 N = fft_goodsize(k*n/v*lambda/r0*CONST.RAD2ARCSEC) u = k * lambda / r0 * CONST.RAD2ARCSEC / N n = v/u - int(v/u) > 0.5 ? int(v/u)+1 : int(v/u)
Rf = Fs . N . D / lambda / P ideally we choose : Fs = lambda / D . Nssp / 2
If we want a good sampling of r0 (to avoid aliasing of speckles that may roll over the FoV), we have to specify a FoV of the FFT support that is larger than seeing by a factor <m> at least equal to 2 (at a very minimum) or 3 (for a better comfort..). This writes as:
with m = 2 or 3. This condition is equivalent to put <m> pixels per r0.
To get reasonable space between pupil images : N > P.(2 + 3S) with S close to 1 N must be a power of 2
to ease computation lets assume that Nssp is a divider of P scaling factor between high res pupil images in pyramid model and actual pupil size on camera images would be P / Nssp
Definition at line 232 of file geom_init.py.
def shesha.init.geom_init.pad_array | ( | A, | |
N | |||
) |
def shesha.init.geom_init.tel_init | ( | carmaWrap_context | context, |
conf.Param_geom | p_geom, | ||
conf.Param_tel | p_tel, | ||
r0 = None , |
|||
ittime = None , |
|||
p_wfss = None , |
|||
dm = None |
|||
) |
Initialize the overall geometry of the AO system, including pupil and WFS.
context | (carmaWrap_context) : context |
p_geom | (Param_geom) : geom settings |
p_tel | (Param_tel) : telescope settings |
r0 | (float) : atmos r0 @ 0.5 microns |
ittime | (float) : 1/loop frequency [s] |
p_wfss | (list of Param_wfs) : wfs settings |
dm | (list of Param_dm) : dms settings [=None] |
:return:
telescope | (Telescope): Telescope object |
Definition at line 72 of file geom_init.py.