3 from astropy.io
import fits
10 def init(tao_settings,sup,*,n_filt=10, wfs="all", dm_use_tt=False):
11 """Initialize the LTAO mode
13 compute meta matrix of interaction / command and write parameter files
16 tao_settings : (dict) : tao settings variables
18 sup : CompassSupervisor : compass supervisor
21 wfs : (str) : (optional), default "all" wfs used by tao ( among "all", "lgs", "ngs")
23 n_filt : (int) : number of Imat eigenvalues to filter out
25 dm_use_tt : (bool) : (optional), default False using a TT DM
29 meta_D = imats.get_metaD(sup,0,0)
31 SVD = cmats.svd_for_cmat(meta_D)
33 meta_Dx = cmats.get_cmat(meta_D,nfilt=n_filt,svd=SVD)
36 data_path = tao_settings[
"INPUT_PATH"]
40 writer.generate_files(sup, path=data_path, single_file=
True,
41 dm_use_tt=dm_use_tt, wfs=wfs, lgs_filter_cst=lgs_filter_cst)
42 writer.write_meta_Dx(meta_Dx,nTS=sup.config.NTS,path=data_path)
46 """Initialize the LTAO mode
48 compute meta matrix of interaction / command and write parameter files
51 tao_settings : (dict) : tao settings variables
54 apply_log : (str) : tao log file name
57 tor : () : tomographic reconstructor
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"])
65 apply_cmd = flags +
" " + tao_path +
"/ltao_reconstructor --sys_path=" \
66 + data_path +
" --atm_path=" + data_path +
" --ncores=1 --gpuIds=" \
67 + gpus +
" --ts=" + tile_size +
" --sync=1 --warmup=0 >" + apply_log \
70 return fits.open(
"M_ltao_0.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=10, wfs="all", dm_use_tt=False)
Initialize the LTAO mode.