3 from astropy.io
import fits
11 def init(tao_settings ,sup,*,n_filt=0,wfs="all",dm_use_tt=False):
12 """Initialize the MOAO mode
14 compute meta matrix of interaction / command and write parameter files
17 tao_settings : (dict) : tao settings variables
19 sup : (CompassSupervisor) : compass supervisor
22 n_filt : (int) : number of Imat eigenvalues to filter out
24 wfs : (str) : (optional), default "all" wfs used by tao ( among "all", "lgs", "ngs")
26 dm_use_tt : (bool) :(optional), default False DM compensating TT
31 meta_D = imats.get_metaD(sup)
33 SVD = cmats.svd_for_cmat(meta_D)
35 meta_Dx = cmats.get_cmat(meta_D, nfilt=n_filt, svd=SVD)
38 data_path = tao_settings[
"INPUT_PATH"]
43 writer.generate_files(sup, path=data_path, single_file=
True,
44 dm_use_tt=dm_use_tt,wfs=wfs, lgs_filter_cst=lgs_filter_cst)
45 writer.write_meta_Dx(meta_Dx, nTS=sup.config.NTS, path=data_path)
49 """Initialize the LTAO mode
51 compute meta matrix of interaction / command and write parameter files
54 tao_settings : (dict) : tao settings variables
57 apply_log : (str) : (optional), default "./log" tao log file name
60 flags = tao_settings[
"STARPU_FLAGS"]
61 tao_path = tao_settings[
"TAO_PATH"]
62 data_path = tao_settings[
"INPUT_PATH"]
63 gpus = tao_settings[
"GPU_IDS"]
64 tile_size = str(tao_settings[
"TILE_SIZE"])
66 apply_cmd=flags+
" "+tao_path+
"/mcao_reconstructor --sys_path="+data_path+
" --atm_path="+data_path+
" --ncores=1 --gpuIds="+gpus+
" --ts="+tile_size+
" --sync=1 --warmup=0 >"+apply_log+
" 2>&1"
69 return fits.open(
"./M_mcao.fits")[0].data.T
Python package for AO operations on COMPASS simulation.
def reconstructor(tao_settings, *apply_log="./log")
Initialize the LTAO mode.
def init(tao_settings, sup, *n_filt=0, wfs="all", dm_use_tt=False)
Initialize the MOAO mode.