MAOS
Multithreaded Adaptive Optics Simulator
sim_utils.h File Reference

Functions

void atm2xloc (dcell **opdx, const sim_t *simu)
 
void sim_update_etf (sim_t *simu)
 
void update_wfsflags (sim_t *simu)
 
void shift_grad (sim_t *simu)
 
void seeding (sim_t *simu)
 
sim_tinit_simu (const parms_t *parms, powfs_t *powfs, aper_t *aper, recon_t *recon, int iseed)
 
void free_simu (sim_t *simu)
 
void print_progress (sim_t *simu)
 
void save_skyc (powfs_t *powfs, recon_t *recon, const parms_t *parms)
 
void genatm (sim_t *simu)
 

Detailed Description

Contains a few support functions for simulation.

Function Documentation

◆ atm2xloc()

void atm2xloc ( dcell **  opdx,
const sim_t simu 
)

Propagate the atmosphere to closest xloc. skip wavefront sensing and reconstruction.

2011-04-26: opdx was incorrectly computed when atm.ht and atmr.ht does not match in number. Fixed. Do not do scaling even if fit.ht is less.

◆ sim_update_etf()

void sim_update_etf ( sim_t simu)

Evolving the Sodium layer by updating the elongation transfer function.

◆ update_wfsflags()

void update_wfsflags ( sim_t simu)

Update flags

◆ shift_grad()

void shift_grad ( sim_t simu)

Shift gradient when new gradients are ready (in the end of parallel section in sim in CL or wfsgrad in OL). Do not execute in parallel with other routines. In GLAO mode, also averaged gradients from the same type of powfs.

◆ seeding()

void seeding ( sim_t simu)

use random number dirived from input seed to seed other stream. necessary to have independant streams for different wfs in threading routines to avoid race condition and have consitent result

◆ init_simu()

sim_t* init_simu ( const parms_t parms,
powfs_t powfs,
aper_t aper,
recon_t recon,
int  iseed 
)

Initialize simu (of type sim_t) and various simulation data structs. Called for every seed.

◆ free_simu()

void free_simu ( sim_t simu)

Release memory of simu (of type sim_t) and close files.

◆ print_progress()

void print_progress ( sim_t simu)

Print out wavefront error information and timing at each time step.

◆ save_skyc()

void save_skyc ( powfs_t powfs,
recon_t recon,
const parms_t parms 
)

Output parameters necessary to run postproc using skyc/skyc.c

◆ genatm()

void genatm ( sim_t simu)

wrap of the generic vonkarman_genatm to generate turbulence screens. Wind velocities are set for each screen.