MAOS
Multithreaded Adaptive Optics Simulator
dbg.conf
#File dbg.conf
###The following are parameters used for debugging or testing.
dbg.atm = [] #Test atmosphere. A number for each layer <0: fourier mode with spatial frequency 1/dbg.atm m^-1. >0: zernike mode.
dbg.mvstlimit=0 #limit minimum variance split tomography low order modes to this number if none zero. (obsolete).
dbg.annular_W=0 #1: use annular amplitude weight when computing W0 and W1 for amplitude weighting in DM fitting. (obsolete).
dbg.tomo_maxit=[]#if not empty, will study these number of tomography iterations in open loop (CPU only).
dbg.tomo_hxw=0 #1: force using ray tracing sparse matrix operator hxw in tomography. 0: use matrix free ray tracing.
dbg.ecovxx=0 #output ecovxx used to generate ecov.
dbg.useopdr=0 #use opdr in PSF reconstruction. (deprecated)
dbg.cmpgpu=0 #1: make cpu code follow GPU implementation (disables cachedm, enables tomo.square)
dbg.wfslinearity=-1#Study the linearity/noise property of pixel processing algorithms of this wfs.
dbg.nocgwarm=0 #disable warm restart in cg.
dbg.dmfullfov=0 #let DM cover full FoV (sim.fov)
dbg.tomo=0 #debug tomography in gpu
dbg.fit=0 #debug fitting in gpu
dbg.gradoff= #Introduced additional gradient offset. dimension: nwfs*nstep
dbg.gradoff_scale=1 #scale the gradient reference vector
dbg.gradoff_reset=0 #methods to reset gradoff after creating matched filter with dithering. default: 0
dbg.dmoff= #DM offset for simulating turbulence on the DM. dimension: ndm*nstep. Obsolete. Use sim.dmadd instead.
dbg.gp_noamp=0 #1: Use annular amplitude amp instead of actual in computing GP for tomography.
dbg.wfs_iac=0. #Cubic spline coupling factor for turbulence fitting onto wfs grid. 0 disables cubic spline.
dbg.fullatm=0 #1: Always copy full atm to GPU. Keep at 0 to save GPU memory.
dbg.lo_blend=0 #Low order multi-rate control blending scheme. 0: no blend, 1: slower loop generates offset for faster loop, 2: HPF/LPF
dbg.eploscale = 1 #scale of eplo for slower loop in multi-rate low order loop control.
dbg.ahst_keepfocus=0 #1: keep LGS focus in ngs mode removal.
dbg.recon_stuck=1 #1: Take into account the influence of stuck actuators in reconstruction if any.
#For plotting
plot.setup=0 #plot aperture,powfs,recon grids, etc.
plot.atm=0 #plot atmosphere
plot.run=0 #plot wfs opd, gradients, DM opd, science opd, etc.
plot.opdx=0 #plot turbulence projeced to xloc.
plot.psf=0 #plot PSF in log (1) or linear (2) mode
plot.all=0 #enables plot.setup, plot.atm, and plot.run
plot.grad2opd=1 #Plot gradients as reconstructed opd (using CuRe)
plot.opdmax=0 #Limit OPD to [-1 1]*opdmax in drawing
plot.gmax=0 #Limit gradient to [-1 1]*gmax in drawing
plot.psfmin=1e-4 #set low limit in plotting.
#The saved files can be loaded with mex routine "read" in MATLAB.
save.extra=1 #Save extra results, such as cleNGSmp, fsm, trombone, etc.
save.all=0 #enables save.setup and save.run. Also enables save.recon, save.mvst, save.ncpa if save.all>1
save.setup=0 #save the data structs prepared during setup in subfolder "setup".
#Some can be loaded back in future simulations.
save.recon=0 #save reconstructor. big matrices.
save.mvst=0 #save mvst intermediate matrices in preparation to load later.
save.ncpa=0 #save NCPA surface in setup_surf.c
save.fdpcg=0 #save FDPCG matrices.
#Run time saving:
save.atm =0 #save atmosphere. not enabled by save.run or save.all
save.run =0 #save RTC telemetry (DM, grads, pixels) and optionally OPDs if save.run>1
#The following four options takes 1) scalar values of 0 or 1 where 1 means all
#wfs. or 2) vector values equal to the number of wfs. In the vector case, 1
#means output, 0 means no output.
save.ints=0 #save wfs subaperture images (images). (read above)
save.grad=0 #save wfs gradients (also enabled by save.run)(read above)
save.gradnf=0 #save noise free wfs gradients (also enabled by save.run)(read above)
save.gradgeom=0#save geometric grads in physical optics simulations (read above)
save.gradpsol=0 #save psol gradients
save.wfsopd=0 #save wfs OPDs (read above)
save.dither=0 #save estimated matched filter from dithering
save.gradoff=0 #save gradient reference vector.
save.evlopd=0 #save science opd every this time step if >0. since 2011-02-07
save.opdr=0 #save reconstructed atmosphere.
save.opdx=0 #save atmosphere propagated to reconstruction grid.
save.dm=0 # total DM commands effective. including tip/tilt.(implicit if save.run=1)
#special run time saving that need extra computation.
save.gcovp=100#save the gcov every 100 steps to different files.
save.gcov=[] #output covariance of psol gradient. set to [1 3 2 5] to output
#covariance between wfs 1 and 3, 2 and 5 drawdaemon is used to do
#the plotting.
save.ecov=0 #save covariance of DM error vector
save.mvmi=0 #save tomography output of mvm control matrix assembly for warm restart.
save.mvmf=0 #save FitR output of mvm control matrix assemble
save.mvm=0 #save MVM control matrix
load.atm=#"atm.fn" #load atmosphere. cell array of double number arrays. The
#sampling must match the key atm.dx in atm_*.conf
load.locs=#"aper_locs" #load aperture grid
load.aloc=#"aloc" #load DM grid
load.xloc=#"xloc" #load tomogrpahy grid. cell array
load.ploc=#"ploc" #load aperture reconstruction grid.
load.floc=#"floc" #load aperture fitting grid.
load.cxx=#"cxx^-1" #load laplacian or bihormonic operator.
#load.HXF=#"HXF" #load propagation matrix from xloc to ploc along fit directions
load.HXW=#"HXW" #load propagation matrix from xloc to ploc along wfs directions
#load.HA=#"HA" #load propagation matrix from aloc to ploc
load.GP=#"GP" #load gradient operator from ploc to wfs (for tomography)
load.GA=#"GA" #load gradient operator from aloc to wfs (to compute pseudo
#openloop gradients)
load.GS0=0 #load gradient operator from WFS opd to WFS grad.
load.tomo=0 #load tomography reconstruction matrices
load.fit=0 #load fitting matrices.
load.W=0 #load aperture W0/W1 weighting matrix.
load.mvst=0 #load mvst intermediate matrices to avoid CBS
load.mvm= #load recon.MVM as a cell array that converts gradients to actuator commands.
load.mvmi= #load tomography output of mvm control matrix assembly for warm restart.
load.mvmf= #load FitR output of mvm control matrix assembly.
load.ncpa= #folder name: load NCPA surface saved during save.ncpa