![]() |
MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
| void | upsample_otf (cmat *out, const cmat *in) |
| cccell * | genseotf (const pts_t *pts, const_anyarray amp, const dcell *opdbias, const_anyarray saa, const dmat *wvl, real r0, real L0, int embfac) |
| void | gensepsf (dccell **psepsfs, const cccell *otfs, const cccell *lotf, const_anyarray saa, const dmat *wvl, long notfx, long notfy) |
| void | gensei (dcell **pi0, dcell **pgx, dcell **pgy, cccell **pfotf, const dccell *sepsfs, const dtf_t *dtf, const etf_t *etf, const dcell *saa, const dcell *gxyrot, const dmat *siglev, const dmat *wvlwts, const dcell *goff, int i0scale, int shift2center) |
Contains routines to generate mean short exposure (tip/tilt removed) pixel intensities. Mostly used for LGS pixel intensity for its matched filter. Structure functions from kolmogorov spectrum is used. Not able to take into account outerscale yet.
| cccell * genseotf | ( | const pts_t * | pts, |
| const_anyarray | amp_, | ||
| const dcell * | opdbias, | ||
| const_anyarray | saa_, | ||
| const dmat * | wvl, | ||
| const real | r0, | ||
| const real | L0, | ||
| const int | embfac ) |
Generates short exposure OTF by calling genotf() with p/t/t removal set. The result is cached in the SEOTF folder.
| [in] | pts | subaperture low left coordinate |
| [in] | amp_ | amplitude map. can be dcell or dmat |
| [in] | opdbias | opd bias for otf. |
| [in] | saa_ | list of subaperture area, can be dcell or dmat |
| [in] | wvl | list of wavelength |
| [in] | r0 | Fried parameter |
| [in] | L0 | Outer scale |
| [in] | embfac | Embedding factor, normally 2 |
| void gensepsf | ( | dccell ** | psepsfs, |
| const cccell * | otfs, | ||
| const cccell * | lotf, | ||
| const_anyarray | saa_, | ||
| const dmat * | wvl, | ||
| long | npsfx, | ||
| long | npsfy ) |
Upsample the otf in to out while preserving the PSF sampling. It changes the sampling of OTF. Do not use this if the sampling of OTFs are needed to be preserved. Createing subaperture short exposure PSF from the tip/tilt removed turbulence OTF and uplink OTF. Not including detector or elongation characteristics.
otfs and lotf must have the same sampling, but may have different dimension. Assumes that the otfs have peak in center.
| [in,out] | psepsfs | PSF. The sampling depends on sampling of OTF and notfx. Initialized if NULL; otherwise each PSF is reallocated. |
| [in] | otfs | OTFs of down link |
| [in] | lotf | OTFs of uplink, optional |
| [in] | saa_ | subaperture area, optional |
| [in] | wvl | wavelength |
| [in] | npsfx | PSF x dimension. optional. If specified, the psf will be padded by 0 or truncated |
| [in] | npsfy | PSF y dimension. optional. If specified, the psf will be padded by 0 or truncated |
| void gensei | ( | dcell ** | pi0, |
| dcell ** | pgx, | ||
| dcell ** | pgy, | ||
| cccell ** | pfotf, | ||
| const dccell * | sepsfs, | ||
| const dtf_t * | dtf, | ||
| const etf_t * | etf, | ||
| const dcell * | saa, | ||
| const dcell * | gxyrot, | ||
| const dmat * | siglev, | ||
| const dmat * | wvlwts, | ||
| const dcell * | goff, | ||
| int | i0scale, | ||
| int | shift2center ) |
generate subaperture short exposure average pixel intensities sampled on detector from short expsoure PSF, the elongation transfer function of the sodium layer, and the detector transfer function.
| [in,out] | pi0 | If not NULL, the nsa*ni0 average pixel intensities. Reallocated if NULL or mismatch in size; otherwise zeroed and recomputed. |
| [in,out] | pgx | If not NULL, derivative of i0 along x (or radial direction if gxyrot is set). Same handling as pi0. |
| [in,out] | pgy | If not NULL, derivative of i0 along y (or azimuthal direction if gxyrot is set). Same handling as pi0. |
| [in,out] | pfotf | If not NULL, the existing content is freed and replaced by the newly allocated OTF (including elongation) of each subaperture and wavelength. |
| [in] | sepsfs | Short exposure PSF, from gensepsf(). |
| [in] | dtf | Detector transfer function, one per wavelength. |
| [in] | etf | Elongation transfer function, one per wavelength. NULL for none. |
| [in] | saa | Subaperture area. Used when i0scale is set. |
| [in] | gxyrot | If not NULL, angle (radian) of each subaperture to compute the derivative in rotated coordinate. |
| [in] | siglev | Signal level. |
| [in] | wvlwts | Wavelength weights. |
| [in] | goff | If not NULL, gradient offset (radian) to shift the PSF by. |
| [in] | i0scale | Whether to scale i0 to match the subaperture area. |
| [in] | shift2center | Whether to shift the PSF to be centered. Cannot be used with goff. |