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) |
dmat * | poly2fit (const dmat *in, const dmat *out, int maxorder) |
dmat * | loc_calib (const dsp *GA, const loc_t *aloc, const loc_t *saloc, real dispx, real dispy, real scale, int maxorder) |
dmat * | polyfit (const dmat *x, const dmat *y, int maxorder) |
dmat * | polyval (const dmat *x, const dmat *coeff, int separate) |
real | calc_dither_amp (dmat **res, const dmat *signal, long dtrat, long npoint, int detrend, int combine) |
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 | ||
) |
Miscellaneous routines. add photon and read out noise. pcalib part of bkgrnd is calibrated out. pcalib2 part of bkgrnd2 is calibrated out.
[in,out] | A | 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 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, |
const loc_t * | aloc, | ||
const loc_t * | saloc, | ||
real | dispx, | ||
real | dispy, | ||
real | scale, | ||
int | maxorder | ||
) |
Calibrate the distortion as measured using interaction matrix.
[in] | GA | Measured interaction matrix |
[in] | aloc | Actuator grid |
[in] | saloc | Subaperture grid |
[in] | dispx | Beam displacement along x |
[in] | dispy | Beam displacement along y |
[in] | scale | Beam cone effect |
[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 |
real calc_dither_amp | ( | dmat ** | res, |
const dmat * | signal, | ||
long | dtrat, | ||
long | npoint, | ||
int | detrend, | ||
int | combine | ||
) |
Demodulate the dithering signal to determine the amplitude. Remove trend (detrending) if detrend is set.
res | result. nmod*1 if not combine. |
signal | array of data. nmod*nsim |
dtrat | skip columns due to wfs/sim dt ratio |
npoint | number of points during dithering |
detrend | flag for detrending (remove linear signal) |
combine | flag for combining modes. for tip/tilt only |