SCAO classes
Calibration
scao_calib__define.pro
Create and run standard SCAO calibration systems starting from parameter dictionaries and data on disks.
How to use it
; defines directory and read parameters files
dir = '~/PASSATA_dir/'
params = read_params_file(dir+'PASSATA_params.pro')
subapsParams = read_params_file(dir+'PASSATA_params_subaps.pro')
slopeNullParams = read_params_file(dir+'PASSATA_params_slopenull.pro')
intmatParams = read_params_file(dir+'PASSATA_params_intmat.pro')
; builds object
sh_calib = obj_new('scao_calib', params, GPU=1B, display=1B, disp_factor=2
; runs subapertures computation
sh_calib.buildSubaps, subapsParams=subapsParams, autoTag=autoTag, subapsExist=subapsExist
if subapsExist eq 0 then sh_calib.runSubaps
; runs slopenull computation
sh_calib.buildSlopeNull, slopeNullParams=slopeNullParams, autoTag=autoTag, slopeNullExist=slopeNullExist
if slopeNullExist eq 0 then sh_calib.runSlopeNull
; runs intmat and recmat computation
sh_calib.buildIntmat, intmatParams=intmatParams, autoTag=autoTag, intmatExist=intmatExist, recmatExist=recmatExist
if intmatExist eq 0 then sh_calib.runIntmat
if recmatExist eq 0 then sh_calib.computeRecmat
Simulation
scao_loop__define.pro
Create and run standard SCAO systems starting from parameter dictionaries and data on disks.
How to use it
; defines directory and read parameters files
dir = '~/PASSATA_dir/'
params = read_params_file(dir+'PASSATA_params.pro')
; builds object
scao_loop = obj_new('scao_loop', 'Scao', params, /waitToBuild, instrumentName='name')
; builds the loop
scao_loop.build, params, runtime_params=runtime_params, use_m2c=use_m2c, autoTag=autoTag, autoDelayRonDarkSky=autoDelayRonDarkSky
; adds the residual phase to the data storage
scao_loop.addStore, /savePhi
; runs the loop
scao_loop.run
; prints a brief summary of the simulation
scao_loop.summary
; saves the data
scao_loop.save, 'file_name.sav'
Notes
- autoTag: if this keyword is set the tags of the parameters dictionary will be changed on the basis of the whole set of parameters.
- autoDelayRonDarkSky: if this keyword is set the value of dealy, read-out-noise, dark current adn sky background of the parameters dictionary will be changed on the basis of the whole set of parameters.
Saved Data
- params: parameters dictionary
- deltaComm: modal delta command vector (one for iterations). Output of the reconstruction matrix.
- comm: modal command vectors (one for iterations). Output of the controller.
- ccdframes: detector frames (one for iterations). Output of the ccd. [optional]
- slopes: WFS slopes (one for iterations). Output of the slopec. [optional]
- wfsPhi: residual phase measured by the WFS (one for iterations). [optional]
- srRes: residual SR value (one for iterations)
- resVar: residual phase (wfsPhi) variance (one for iterations)
- resMod: residual modes vector from madalanalysis (one for iterations)
- wfsFlux: flux value on the WFS
- pupMask: pupil mask
How to restore saved data
Use the datastore restore method to restore saved data:
dstore = obj_new('datastore')
dstore.restore, 'file_name.sav'
Then use the methods
values,
times,
mean,
stddev,
variance and
plot to manage the data. Other useful methods are
keys and
HasKey (see IDL help of
dictionary object).
Note on autoTag keyword
The autoTag is used to update the tags (
pupil or
subapdata,
sn,
intmat and
recmat) of the parameters dictionary with tags auto generated from the other parameters (see give_me_the_tags_scao.pro procedure). To avoid a specific tag to be updated a key
do_not_change..._tag_ can be added to the
slopec of
modalrec dictionary with value 1B.
Example:
{slopec,
pupdata_tag = 'lbt_40x40'
do_not_change_pupdata_tag = 1B ; if set to 1B give_me_the_tags_scao will not update pupdata_tag
sn_tag = 'lbt_40x40'
thr1 = 0.3 ; threshold no. 1 for pupil computation
thr2 = 0.3 ; threshold no. 2 for pupil computation
subap_norm = 0
computation_time = 0.65e-3 ; [s] RTC computation time (used by give_me_delay_ron_dark procedure)
}
--
GuidoAgapito - 21 Aug 2018