MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
void | plotloc (const char *fig, const parms_t *parms, loc_t *loc, real ht, const char *format,...) |
void | plotdir (const char *fig, const parms_t *parms, real totfov, const char *format,...) |
void | remove_lock (int *fdlock, char **fnlock, long *seeds, long nseed, long iseed, int success) |
Remove lock file and create Res_seed.done file when maos finishes a seed. More... | |
void | maos_final (int sig) |
int | maos_signal_handler (int sig) |
arg_t * | parse_args (int argc, const char *argv[]) |
void | free_arg (arg_t **parg) |
char * | evl_keywords (const parms_t *parms, const aper_t *aper, int ievl, int iwvl, int isim) |
void | apply_fieldstop (dmat *opd, const dmat *amp, const lmat *embed, long nembed, const dmat *fieldstop, real wvl) |
void | display_server (int sock) |
void | plot_setup (const parms_t *parms, const powfs_t *powfs, const aper_t *aper, const recon_t *recon) |
dmat * | mkamp (const loc_t *loc, const map_t *ampground, real misregx, real misregy, real D, real Din) |
void | maxapriori (real *g, const dmat *ints, const parms_t *parms, const powfs_t *powfs, int iwfs, int isa, int noisy, real bkgrnd, real rne) |
void | wfslinearity (const parms_t *parms, powfs_t *powfs, const int iwfs) |
void | lgs_wfs_sph_psd (const parms_t *parms, powfs_t *powfs, recon_t *recon, const int iwfs) |
real | wfsfocusadj (sim_t *simu, int iwfs) |
void | dither_position (real *cs, real *ss, int alfsm, int dtrat, int npoint, int isim, real deltam) |
void | shwfs_grad (dmat **pgrad, dmat *ints[], const parms_t *parms, const powfs_t *powfs, int iwfs, int phytype) |
dcell * | dcellread_prefix (const char *file, const parms_t *parms, int ipowfs) |
real | average_powfs (dmat *A, lmat *wfsindex, int replace) |
void | wfsgrad_llt_tt (real *ttx, real *tty, sim_t *simu, int iwfs, int isim) |
void plotloc | ( | const char * | fig, |
const parms_t * | parms, | ||
loc_t * | loc, | ||
real | ht, | ||
const char * | format, | ||
... | |||
) |
Plot the loc, together with all beams
void plotdir | ( | const char * | fig, |
const parms_t * | parms, | ||
real | totfov, | ||
const char * | format, | ||
... | |||
) |
ploted all the different beam directions as points.
void remove_lock | ( | int * | fdlock, |
char ** | fnlock, | ||
long * | seeds, | ||
long | nseed, | ||
long | iseed, | ||
int | success | ||
) |
Remove lock file and create Res_seed.done file when maos finishes a seed.
fdlock | |
fnlock | |
seeds | |
nseed | |
iseed | |
success |
void maos_final | ( | int | sig | ) |
Rename the log files when simulation exits or when signal is caught.
int maos_signal_handler | ( | int | sig | ) |
Handles signals.
arg_t* parse_args | ( | int | argc, |
const char * | argv[] | ||
) |
Parse command line arguments argc, argv
Creates header for saving PSFs.
void plot_setup | ( | const parms_t * | parms, |
const powfs_t * | powfs, | ||
const aper_t * | aper, | ||
const recon_t * | recon | ||
) |
Plot grid points, amplitude maps and NCPA.
dmat* mkamp | ( | const loc_t * | loc, |
const map_t * | ampground, | ||
real | misregx, | ||
real | misregy, | ||
real | D, | ||
real | Din | ||
) |
Create WFS amplitude map from coordinate, masked with annular defined by (D,Din).
void maxapriori | ( | real * | g, |
const dmat * | ints, | ||
const parms_t * | parms, | ||
const powfs_t * | powfs, | ||
int | iwfs, | ||
int | isa, | ||
int | noisy, | ||
real | bkgrnd, | ||
real | rne | ||
) |
Implements MAP tracking algorithm. The polar coordinate is implicitly taken care of in mapfun
Compute spherical aberration in LGS WFS gradients for all sodium profile columns.
real wfsfocusadj | ( | sim_t * | simu, |
int | iwfs | ||
) |
Compute the focus adjustment need to apply to OPD of wfs. Used in both CPU and GPU code.
void dither_position | ( | real * | cs, |
real * | ss, | ||
int | alfsm, | ||
int | dtrat, | ||
int | npoint, | ||
int | isim, | ||
real | deltam | ||
) |
Expected averaged position of dithering signal during WFS integration. Called when (isim+1)dtrat=0
void shwfs_grad | ( | dmat ** | pgrad, |
dmat * | ints[], | ||
const parms_t * | parms, | ||
const powfs_t * | powfs, | ||
const int | iwfs, | ||
const int | phytype | ||
) |
Calculate gradients using current specified algorithm
Read cell array from file specified by whole name or prefix.
average per powfs. replace the content when replace is set.
void wfsgrad_llt_tt | ( | real * | ttx, |
real * | tty, | ||
sim_t * | simu, | ||
int | iwfs, | ||
int | isim | ||
) |
Compute tip/tilt for llt ray trace.