![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
| void | ngsmod_prep (const parms_t *parms, recon_t *recon, const aper_t *aper) |
| void | ngsmod_setup (const parms_t *parms, recon_t *recon) |
| void | ngsmod_dot (real *pttr_out, real *pttrcoeff_out, real *ngsmod_out, const parms_t *parms, const ngsmod_t *ngsmod, const aper_t *aper, const real *opd, int ievl) |
| int | ngsmod_dot_post (real *pttr_out, real *pttrcoeff_out, real *ngsmod_out, real tot, const real *coeff, const ngsmod_t *ngsmod, const aper_t *aper, real thetax, real thetay) |
| void | ngsmod_free (ngsmod_t *ngsmod) |
| void | ngsmod_split (dcell **Merr, sim_t *simu, dcell *dmerr) |
| void | ngsmod_remove (sim_t *simu, dcell *dmerr) |
| void | ngsmod_opd (dmat *iopd, const loc_t *loc, const ngsmod_t *ngsmod, real thetax, real thetay, const real *mod, real alpha) |
Contains functions to setup NGS modes and reconstructor using AHST for one or more DMs. Use parms->wfsr instead of parms->wfs for wfs information, which hands GLAO mode correctly.
Notice that update of this file may require GPU code update accordingly
AHST parameters that are related to the geometry only, and will not be updated when estimated WFS measurement noise changes.
| [in] | parms | Simulation parameters. |
| [in,out] | recon | Reconstructor. recon->ngsmod is allocated and set up. |
| [in] | aper | Aperture of science evaluation. |
setup NGS modes reconstructor in ahst mode.
When tomo.ahst_wt=1:
\( Rngs=GM^\dagger=(GM'*W_N*GM)^{-1}*GM'*W_N \) where W_N is recon->saneai \( M^\dagger=Rngs*GA \) reconstruct mode from NGS measurements equals to original mode \( Pngs=M*M^\dagger=M*Rngs*GA \) satisfies Rngs*GA*Pngs=Rngs*GA In other words, \( M^\dagger=(M^T W_G M)^{-1}*M^T W_G with W_G=(GA^T*W_N*GA) \)
Projector has the properties: \( M*Pngs*(1-M*Pngs)=0 \)
| [in] | parms | Simulation parameters. |
| [in,out] | recon | Reconstructor. recon->ngsmod->Rngs (and Pngs if tomo.ahst_wt==1) are updated. |
| void ngsmod_dot | ( | real * | pttr_out, |
| real * | pttrcoeff_out, | ||
| real * | ngsmod_out, | ||
| const parms_t * | parms, | ||
| const ngsmod_t * | ngsmod, | ||
| const aper_t * | aper, | ||
| const real * | opd, | ||
| int | ievl ) |
used in performance evaluation on science opds. The outputs are overwritten (not accumulated).
| [out] | pttr_out | Variance of piston removed, tip/tilt, and piston/tip/tilt removed OPD. May be NULL. |
| [out] | pttrcoeff_out | Piston, tip, and tilt coefficients. May be NULL. |
| [out] | ngsmod_out | NGS mode coefficients (nmod elements). |
| [in] | parms | Simulation parameters. |
| [in] | ngsmod | NGS mode configuration. |
| [in] | aper | Aperture of science evaluation. |
| [in] | opd | Science OPD defined on aper->locs. |
| [in] | ievl | Index of the evaluation direction. |
| int ngsmod_dot_post | ( | real * | pttr_out, |
| real * | pttrcoeff_out, | ||
| real * | ngsmod_out, | ||
| real | tot, | ||
| const real * | coeff, | ||
| const ngsmod_t * | ngsmod, | ||
| const aper_t * | aper, | ||
| real | thetax, | ||
| real | thetay ) |
Separate post processing part so that GPU code can call it.
| [out] | pttr_out | Variance of piston removed, tip/tilt, and piston/tip/tilt removed OPD. May be NULL. |
| [out] | pttrcoeff_out | Piston, tip, and tilt coefficients. May be NULL. |
| [out] | ngsmod_out | NGS mode coefficients (nmod elements). |
| [in] | tot | Weighted sum of OPD squared. |
| [in] | coeff | Weighted sum of OPD times 1, x, y, x*x, y*y, x*y. |
| [in] | ngsmod | NGS mode configuration. |
| [in] | aper | Aperture of science evaluation. |
| [in] | thetax | Evaluation direction along x (radian). |
| [in] | thetay | Evaluation direction along y (radian). |
| void ngsmod_free | ( | ngsmod_t * | ngsmod | ) |
frees ngsmod_t
| [in] | ngsmod | The struct to free. May be NULL. |
Split NGS mode error from dmerr
| [out] | Merr | NGS mode error. Allocated if NULL. |
| [in] | simu | Simulation data. |
| [in,out] | dmerr | DM error signal. NGS modes are removed in place. |
remove NGS modes from LGS DM commands.
| [in,out] | simu | Simulation data. The intermediate NGS mode vectors are updated. |
| [in,out] | dmerr | LGS DM error signal. NGS modes are removed in place. |
| void ngsmod_opd | ( | dmat * | iopd, |
| const loc_t * | loc, | ||
| const ngsmod_t * | ngsmod, | ||
| real | thetax, | ||
| real | thetay, | ||
| const real * | mode, | ||
| real | alpha ) |
Obtain OPD on loc for NGS mode vector.
| [in,out] | iopd | OPD to accumulate to. |
| [in] | loc | Grid of iopd. |
| [in] | ngsmod | NGS mode configuration. |
| [in] | thetax | Direction along x (radian). |
| [in] | thetay | Direction along y (radian). |
| [in] | mode | NGS mode vector (nmod elements). |
| [in] | alpha | Scaling factor. |