MAOS
Multithreaded Adaptive Optics Simulator
ahst.h File Reference

Functions

void ngsmod_prep (const parms_t *parms, recon_t *recon, const aper_t *aper, const powfs_t *powfs)
 
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 ngsmod2science (dmat *iopd, const loc_t *loc, const ngsmod_t *ngsmod, real thetax, real thetay, const real *mod, real alpha)
 

Detailed Description

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

Function Documentation

◆ ngsmod_prep()

void ngsmod_prep ( const parms_t parms,
recon_t recon,
const aper_t aper,
const powfs_t powfs 
)

AHST parameters that are related to the geometry only, and will not be updated when estimated WFS measurement noise changes.

◆ ngsmod_setup()

void ngsmod_setup ( const parms_t parms,
recon_t recon 
)

setup NGS modes reconstructor in ahst mode.

When tomo.ahst_wt=1:

Rngs=GM^=(GM'*W_N*GM)^{-1}*GM'*W_N #W_N is recon->saneai M^=Rngs*GA reconstruct mode from NGS measurements equals to original mode Pngs=M*M^=M*Rngs*GA satisfies Rngs*GA*Pngs=Rngs*GA In other words, M^=(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

◆ ngsmod_dot()

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. accumulate to out

◆ ngsmod_dot_post()

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. Return non zero if error happens.

◆ ngsmod_free()

void ngsmod_free ( ngsmod_t ngsmod)

frees ngsmod_t

◆ ngsmod_remove()

void ngsmod_remove ( sim_t simu,
dcell dmerr 
)

remove NGS modes from LGS DM commands.

Todo:
handle 3 DM case.

◆ ngsmod2science()

void ngsmod2science ( dmat iopd,
const loc_t loc,
const ngsmod_t ngsmod,
real  thetax,
real  thetay,
const real *  mod,
real  alpha 
)

Convert NGS mode vector to aperture grid for science directions.

2017-09-11: Deprecated. This routine does not take into account DM 2 science misregistration.