![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
| void | addnoise (dmat *A, rand_t *rstat, const real bkgrnd, const real bkgrndc, const dmat *bkgrnd2, const dmat *bkgrnd2c, const dmat *qe, real rne, real excess) |
| void | addnoise_grad (dmat *grad, const dmat *neal, rand_t *srand) |
| int | cog_multi (dmat **cg, const dmat *im, const dmat *loc, int wsize) |
| void | cog_nea (real *nea, const dmat *ints, const dmat *cogmask, real cogthres, real cogoff, int ntry, rand_t *rstat, real bkgrnd, real bkgrndc, const dmat *bkgrnd2i, const dmat *bkgrnd2ic, real rne) |
| dmat * | poly2fit (const dmat *in, const dmat *out, int maxorder) |
| dmat * | loc_calib (const dsp *GA, propdata_t *propdata, int maxorder) |
| dmat * | polyfit (const dmat *x, const dmat *y, int maxorder) |
| dmat * | polyval (const dmat *x, const dmat *coeff, int separate) |
| int | wrap_seq (long index, long n) |
| real | wrap2range (real val, real low, real high) |
| real | pchip_wt (int i, float u) |
| compute p-chip interpolation weighting See https://en.wikipedia.org/wiki/Cubic_Hermite_spline | |
| int | atm_interp (real *wt, int ips, int isim, int dtrat, int natm, int interp) |
| Compute dome seeing turbulence interpolation parameters. | |
| dccell * | wfe_fov_prep (const dmat *thetax, const dmat *thetay, real unit, int npath, int nwvl) |
| void | wfe_fov_fill (dccell *res, const dcell *clep, int ipath, int isim) |
| void addnoise | ( | dmat * | A, |
| rand_t * | rstat, | ||
| const real | bkgrnd, | ||
| const real | bkgrndc, | ||
| const dmat * | bkgrnd2, | ||
| const dmat * | bkgrnd2c, | ||
| const dmat * | qe, | ||
| const real | rne, | ||
| real | excess ) |
add photon and read out noise. pcalib part of bkgrnd is calibrated out. pcalib2 part of bkgrnd2 is calibrated out.
| A | [in/out]The pixel intensity array | |
| [in] | rstat | The random stream |
| [in] | bkgrnd | Real background in PDEs per pixel per frame |
| [in] | bkgrndc | Removed background in PDEs per pixel per frame |
| [in] | bkgrnd2 | Real background in PDEs of each pixel per frame. |
| [in] | bkgrnd2c | Removed background in PDEs of each pixel per frame. |
| [in] | qe | Pixel dependent Quantum Efficiency |
| [in] | rne | Read out noise per pixel per read |
| [in] | excess | Excess noise factor |
Add noise to gradients according to neal, which is LL' decomposition of the sanea
Determine the CoG on multiple locations near the nominal position.
| [out] | cg | n*3 The determined position and total intensity. |
| [in] | im | 2-d array contains the image |
| [in] | loc | n*2 array. contains the nominal position of each peak |
| [in] | wsize | window size |
Determine the polynomial coefficients that transforms 2-d coordinate (of a grid) in to out.
| [in] | in | input grid. n*2 |
| [in] | out | distorted grid, n*2 |
| [in] | maxorder | Maximum order |
| dmat * loc_calib | ( | const dsp * | GA, |
| propdata_t * | propdata, | ||
| int | maxorder ) |
Calibrate the distortion as measured using interaction matrix.
| [in] | GA | Measured interaction matrix |
| propdata | in] See accphi.h | |
| [in] | maxorder | Maximum power of x/y. Negative to limit total power |
Determine the polynomial coefficients that transforms vector in to out. Both column and row vectors are allowed.
| [in] | x | input vector |
| [in] | y | output |
| [in] | maxorder | maximum order to fit |
| [in] | x | input vector |
| [in] | coeff | the coefficient from polyfit |
| [in] | separate | if set, separately for each order |
Wrap the index for dataset with total of n frames for continuity. For example, if n is 4, the result is 0 1 2 3 2 1 0 1 2 3 2 1 0 ...
| real wrap2range | ( | real | val, |
| real | low, | ||
| real | high ) |
wrap val to between low and high Notice the difference between remainder() and fmod(). remainder(a,b) wraps a to [-b/2, b/2) fmod(a,b) wraps a to [-b,b)
| real pchip_wt | ( | int | i, |
| float | u ) |
compute p-chip interpolation weighting See https://en.wikipedia.org/wiki/Cubic_Hermite_spline
| i | index into p[], p[i] with i from -1 to 2 |
| u | fractional distance from i. between [0,1) |
| int atm_interp | ( | real * | wt, |
| int | ips, | ||
| int | isim, | ||
| int | dtrat, | ||
| int | natm, | ||
| int | interp ) |
Compute dome seeing turbulence interpolation parameters.
| wt | Returned weight |
| ips | Current layer index |
| isim | Current simulation frame index |
| dtrat | Turbulence dtrat |
| natm | Turbulence frame count |
| interp | Interpolation method: 0: no interpolation. 1: linear. 2: sin^2. 3: p-chip. |
Prepare data structure to plot WFE vs field angle. Use together with wfe_fov_fill()
| npath | Number of simulation directories |