MAOS
Multithreaded Adaptive Optics Simulator
Loading...
Searching...
No Matches
sim_utils.h File Reference

Functions

void genatm (sim_t *simu)
void sim_update_sodium (sim_t *simu)
void update_wfsflags (sim_t *simu)
void shift_grad (sim_t *simu)
void seeding (sim_t *simu)
sim_t * sim_init (const parms_t *parms, powfs_t *powfs, aper_t *aper, recon_t *recon, int iseed)
void sim_free (sim_t *simu)
void print_progress (sim_t *simu)
void save_skyc (powfs_t *powfs, recon_t *recon, const parms_t *parms)

Detailed Description

Contains a few support functions for simulation.

Function Documentation

◆ genatm()

void genatm ( sim_t * simu)

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

Here is the call graph for this function:

◆ sim_update_sodium()

void sim_update_sodium ( sim_t * simu)

Evolving the Sodium layer by updating the elongation transfer function.

The trombone position is also updated.

◆ 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

◆ sim_init()

sim_t * sim_init ( 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.

◆ sim_free()

void sim_free ( 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