MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
powfs_t * | setup_powfs_init (const parms_t *parms, aper_t *aper) |
void | setup_powfs_amp (powfs_t *powfs, const parms_t *parms, aper_t *aper, int ipowfs) |
void | setup_powfs_misreg_dm (powfs_t *powfs, const parms_t *parms, int ipowfs) |
void | setup_shwfs_phy (const parms_t *parms, powfs_t *powfs) |
void | setup_powfs_neasim (const parms_t *parms, powfs_t *powfs) |
void | setup_powfs_calib (const parms_t *parms, powfs_t *powfs) |
void | free_powfs_unused (const parms_t *parms, powfs_t *powfs) |
void | free_powfs (const parms_t *parms, powfs_t *powfs) |
void | setup_shwfs_etf (powfs_t *powfs, const parms_t *parms, int ipowfs, int mode, int icol, real deltah, real thresh) |
void | wfspupmask (const parms_t *parms, loc_t *loc, dmat *amp, int iwfs) |
void | setup_pywfs (const pywfs_cfg_t *pycfg, powfs_t *powfs, const parms_t *parms, aper_t *aper, int ipowfs) |
Setting up WFS geometry. like the subaperture location, subaperture grid points, physical optics detection transfer function, LGS elongation transfer function, etc.
Do not use sparse interpolation to replace ray tracing for fine sampled destination grid, especially cubic splines. The interpolation marix takes too much space.
TODO: This routine and powfs_t should only contain information about the simulation, not about any model used during reconstruction (RTC) to avoid leaking information from the "real world (simulation)" to our knowledge (RTC).
Setup the powfs struct based on parms and aper. Everything about wfs are setup here.
Setup telescope to WFS pupil misregistration.
It is tricky to implement the misregistration of the deformable mirror and the WFS.
Misregistration of the deformable mirror.
Denote the grid of actuators as saloc, and with misregistration, it becomes salocm.
Misregistration of the WFS.
Denote the grid of the WFS entry pupil as loc, and with misregistration, it becomes locm. Project the telescope amplitude map onto loc, we get amp, which is what we know. Project the telescope amplitude map onto locm, we get ampm, which is what happens but we don't know.
setup DM to WFS misregistration.
Setup physical optics parameters for SHWFS, such as DTF, ETF, LLT, pixel processing.
free unused parameters before simulation starts
Free all parameters of powfs at the end of simulation.
void setup_shwfs_etf | ( | powfs_t * | powfs, |
const parms_t * | parms, | ||
int | ipowfs, | ||
int | mode, | ||
int | icol, | ||
real | deltah, | ||
real | thresh | ||
) |
Compute Elongation Transfer function.
Creates WFS pupil mask.
void setup_pywfs | ( | const pywfs_cfg_t * | pycfg, |
powfs_t * | powfs, | ||
const parms_t * | parms, | ||
aper_t * | aper, | ||
int | ipowfs | ||
) |
Setup pyramid WFS based on configuration.
Todo: In order to move the implementation to lib/ the following changes are needed