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

Functions

dsp * mkg (loc_t *xloc, loc_t *ploc, dmat *amp, loc_t *saloc, dmat *saa, real saat, real scale, real dispx, real dispy, int do_partial)
dsp * mkgt (loc_t *xloc, loc_t *ploc, dmat *amp, loc_t *saloc, dmat *saa, real saat, real scale, real dispx, real dispy, int do_partial)
dmat * mkg_ngs (dmat *sacent, real thetax, real thetay, real hc, real hs, int indps, int indastig, int indfocus, int ahstfocus)
 Compute the NGS modal to t/t or t/t/f gradient interaction matrix. Use for sky coverage code for adhoc split tomography.

Detailed Description

Contains function that creates average gradient operator

Function Documentation

◆ mkg()

dsp * mkg ( loc_t * xloc,
loc_t * ploc,
dmat * amp,
loc_t * saloc,
dmat * saa,
real saat,
real scale,
real dispx,
real dispy,
int do_partial )

Returns the transpose of mkgt()

◆ mkgt()

dsp * mkgt ( loc_t * xloc,
loc_t * ploc,
dmat * pamp,
loc_t * saloc,
dmat * saa,
real saat,
real scale,
real dispx,
real dispy,
int do_partial )

Returns the transpose of a average gradient operator that converts the OPDs defined on xloc to subapertures defines on saloc with ploc as the intermediate pupil plane.

Parameters
xlocthe grid on which OPDs are defined
plocthe grid on the aperture plane
pampthe amplitude on ploc
salocLower left origin of the subapertures
saasubaperture amplitude, normalized to max at 1.
saatsaa threshold to enable gradient operation.
scalecone effect
dispxdisplacement due to beam angle (2 vector). similar as accphi routines
dispydisplacement due to beam angle (2 vector). similar as accphi routines
do_partial1: use points that are outside of but close to a subaperture. 0: do not use.

◆ mkg_ngs()

dmat * mkg_ngs ( dmat * sacent,
real thetax,
real thetay,
real hc,
real hs,
int indps,
int indastig,
int indfocus,
int ahstfocus )

Compute the NGS modal to t/t or t/t/f gradient interaction matrix. Use for sky coverage code for adhoc split tomography.

Parameters
sacentAmplitude weighted center coordinate of each subaperture (nsa*2)
thetaxangular coordinate of NGS
thetayangular coordinate of NGS
hcupper DM conjugation range (for MCAO)
hsLGS range
indpsPlate scale mode index (0 or 2) (for MCAO)
indastigAstigmatism mode index (0 or 2) (for LTAO)
indfocusFocus mode index (0 or indps+3 or indastig+2
ahstfocus=1: no focus mode in first PS mode in science OPD.
Returns
dmat