MAOS
Multithreaded Adaptive Optics Simulator
mkw.h File Reference

Functions

void mkw_amp (loc_t *loc, real *amp, dsp **W0, dmat **W1)
 
void mkw_circular (loc_t *loc, real cx, real cy, real r, dsp **W0, dmat **W1)
 
void mkw_annular (loc_t *loc, real cx, real cy, real cri, real cro, dsp **W0, dmat **W1)
 

Detailed Description

Contains functions that computes the bilinear weighting function W0, W1

Function Documentation

◆ mkw_amp()

void mkw_amp ( loc_t loc,
real *  amp,
dsp **  W0,
dmat **  W1 
)

compute the W0, W1 for bilinear influence function. The normalization is very important. We need to have sum(amp)==1; W0 and W1 can not be scaled because: 1) they scale the same way as amp, 2) we are using W0-W1*W1', one is linear, one is quadratic. So the result will be different.

for the result, we must have 1) sum(W0,1)==W1, sum(W0,2)==W1, 2) sum(W1)==1 2009-11-20: bug found: using a circular gray pixel amplitude map, sum(W1) is less than 1 if loc is not large enough. This method is not good! Prefer the mkw_circular instead which follows closely the laos method. The LAOS W0/W1 gives very good performance in NGS modes.

This function does not work well.

◆ mkw_circular()

void mkw_circular ( loc_t loc,
real  cx,
real  cy,
real  cr,
dsp **  W0,
dmat **  W1 
)

compute the W0, W1 for bilinear influence function for a circular aperture of radius cr, so that for OPD vector A defined on grid loc, the piston removed wavefront error, calculated as A'*(W0-W1*W1')*A is equal to the wavefront error for a continuous OPD that are interpolated bi-linearly using the OPD on the grid.

Parameters
[in]locgrid coordinate
[in]cxcenter of circle, x
[in]cycenter of circle, y
[in]crcircle radius
[out]W0sparse W0
[out]W1dense W1

◆ mkw_annular()

void mkw_annular ( loc_t loc,
real  cx,
real  cy,
real  cri,
real  cro,
dsp **  W0,
dmat **  W1 
)

compute the W0, W1 for bilinear influence function for a annular aperture of radius inner radius cri, and outer radius cro. see mkw().

Parameters
[in]locgrid coordinate
[in]cxcenter of circle, x
[in]cycenter of circle, y
[in]criinner circular hole radius
[in]croouter circle radius
[out]W0sparse W0
[out]W1dense W1