![]() |
COMPASS
5.0.0
End-to-end AO simulation tool using GPU acceleration
|
Functions | |
def | loop (n) |
def | preloop (n) |
def | compute_btt () |
def | compute_cmatWithBtt (Btt, nfilt) |
def | compute_cmatWithBtt2 (Btt, nfilt) |
def | cov_cor (P, noise, trunc, alias, H, bp, tomo) |
def | save_it (filename) |
Variables | |
string | error = 'command line should be at least:"python -i test.py parameters_filename"\n with "parameters_filename" the path to the parameters file' |
param_file = sys.argv[1] | |
filename = param_file.split('/')[-1] | |
param_path = param_file.split(filename)[0] | |
savename = sys.argv[2] | |
string | simul_name = "" |
dictionary | matricesToLoad = {} |
int | clean = 1 |
param_dict = h5u.params_dictionary(config) | |
c = ch.carmaWrap_context(devices=np.array([0, 1], dtype=np.int32)) | |
wfs | |
tel | |
atm | |
dms = ao.dm_init(config.p_dms, config.p_wfss, wfs, config.p_geom, config.p_tel) | |
tar | |
rtc | |
bool | error_flag = True in [w.roket for w in config.p_wfss] |
nfiltered = config.p_controllers[0].maxcond | |
_ _ | |_ ___ ___| |_ ___ | __/ _ \/ __| __/ __| | || __/__ \ |___ \ _____||___/__|___/ More... | |
niters = config.p_loop.niter | |
Btt | |
P | |
Dm | |
cmat | |
R = rtc.get_cmat(0) | |
imat = rtc.get_imat(0) | |
RD = np.dot(R, imat).astype(np.float32) | |
tuple | gRD = (np.identity(RD.shape[0]) - config.p_controllers[0].gain * RD).astype(np.float32) |
roket | |
SR | |
SR2 | |
def roket_gpu.compute_btt | ( | ) |
| _ ) __ _ __(_)___ | _ \/ _` (-< (_-< |___/_,_/__/_/__/
Definition at line 283 of file roket_gpu.py.
def roket_gpu.compute_cmatWithBtt | ( | Btt, | |
nfilt | |||
) |
Definition at line 334 of file roket_gpu.py.
def roket_gpu.compute_cmatWithBtt2 | ( | Btt, | |
nfilt | |||
) |
Definition at line 352 of file roket_gpu.py.
def roket_gpu.cov_cor | ( | P, | |
noise, | |||
trunc, | |||
alias, | |||
H, | |||
bp, | |||
tomo | |||
) |
/ __|_____ ____ _ _ _(_)__ _ _ _ __ ___ / _|___ __ ___ _ _ _ _ ___| |__ _| |_(_)___ _ _ | (__/ _ \ V / _‘ | ’_| / _‘ | ’ \/ _/ -_) > _|_ _| / _/ _ \ '_| '_/ -_) / _‘ | _| / _ \ ’ \ ______/_/__,_|_| |___,_|_||______| _____| _____/_| |_| ___|___,_|__|____/_||_|
Definition at line 379 of file roket_gpu.py.
def roket_gpu.loop | ( | n | ) |
/_\ / _ \ | |___ ___ _ __ / _ \ (_) | | / _ \/ _ \ '_ \ /_/ ____/ |____/___/ .__/ |_|
Performs the main AO loop for n interations. First, initialize buffers for error breakdown computations. Then, at the end of each iteration, just before applying the new DM shape, calls the error_breakdown function.
:param n: (int) : number of iterations
:return: com (np.array((n,nactus))) : full command buffer
noise_com (np.array((n,nactus))) : noise contribution for error breakdown
alias_wfs_com (np.array((n,nactus))) : aliasing estimation in the WFS direction
tomo_com (np.array((n,nactus))) : tomography error estimation
H_com (np.array((n,nactus))) : Filtered modes contribution for error breakdown
trunc_com (np.array((n,nactus))) : Truncature and sampling error of WFS
bp_com (np.array((n,nactus))) : Bandwidth error estimation on target
mod_com (np.array((n,nactus))) : Commanded modes expressed on the actuators
fit (float) : fitting (mean variance of the residual target phase after projection)
SR (float) : final strehl ratio returned by the simulation
Definition at line 166 of file roket_gpu.py.
def roket_gpu.preloop | ( | n | ) |
Definition at line 256 of file roket_gpu.py.
def roket_gpu.save_it | ( | filename | ) |
/ __| __ ___ _____ __ \/ _` \ V / -_) |___/__,_|_/___|
Definition at line 415 of file roket_gpu.py.
roket_gpu.atm |
Definition at line 91 of file roket_gpu.py.
roket_gpu.Btt |
Definition at line 480 of file roket_gpu.py.
roket_gpu.c = ch.carmaWrap_context(devices=np.array([0, 1], dtype=np.int32)) |
Definition at line 81 of file roket_gpu.py.
int roket_gpu.clean = 1 |
Definition at line 72 of file roket_gpu.py.
roket_gpu.cmat |
Definition at line 482 of file roket_gpu.py.
roket_gpu.Dm |
Definition at line 482 of file roket_gpu.py.
roket_gpu.dms = ao.dm_init(config.p_dms, config.p_wfss, wfs, config.p_geom, config.p_tel) |
Definition at line 97 of file roket_gpu.py.
string roket_gpu.error = 'command line should be at least:"python -i test.py parameters_filename"\n with "parameters_filename" the path to the parameters file' |
Definition at line 22 of file roket_gpu.py.
bool roket_gpu.error_flag = True in [w.roket for w in config.p_wfss] |
Definition at line 128 of file roket_gpu.py.
roket_gpu.filename = param_file.split('/')[-1] |
Definition at line 28 of file roket_gpu.py.
tuple roket_gpu.gRD = (np.identity(RD.shape[0]) - config.p_controllers[0].gain * RD).astype(np.float32) |
Definition at line 488 of file roket_gpu.py.
roket_gpu.imat = rtc.get_imat(0) |
Definition at line 485 of file roket_gpu.py.
roket_gpu.matricesToLoad = {} |
Definition at line 70 of file roket_gpu.py.
roket_gpu.nfiltered = config.p_controllers[0].maxcond |
_ _ | |_ ___ ___| |_ ___ | __/ _ \/ __| __/ __| | || __/__ \ |___ \ _____||___/__|___/
Definition at line 477 of file roket_gpu.py.
roket_gpu.niters = config.p_loop.niter |
Definition at line 478 of file roket_gpu.py.
roket_gpu.P |
Definition at line 480 of file roket_gpu.py.
roket_gpu.param_dict = h5u.params_dictionary(config) |
Definition at line 75 of file roket_gpu.py.
roket_gpu.param_file = sys.argv[1] |
Definition at line 26 of file roket_gpu.py.
roket_gpu.param_path = param_file.split(filename)[0] |
Definition at line 29 of file roket_gpu.py.
roket_gpu.R = rtc.get_cmat(0) |
Definition at line 484 of file roket_gpu.py.
Definition at line 486 of file roket_gpu.py.
roket_gpu.roket |
Definition at line 489 of file roket_gpu.py.
roket_gpu.rtc |
Definition at line 106 of file roket_gpu.py.
string roket_gpu.savename = sys.argv[2] |
Definition at line 48 of file roket_gpu.py.
string roket_gpu.simul_name = "" |
(_)_ __ (_) |_ ___ | | '_ | | __/ __| | | | | | | |___ \ |_|_| |_|_|__|___/
Definition at line 63 of file roket_gpu.py.
roket_gpu.SR |
Definition at line 498 of file roket_gpu.py.
roket_gpu.SR2 |
Definition at line 498 of file roket_gpu.py.
roket_gpu.tar |
Definition at line 101 of file roket_gpu.py.
roket_gpu.tel |
Definition at line 86 of file roket_gpu.py.
roket_gpu.wfs |
Definition at line 86 of file roket_gpu.py.