MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
void | genotf (ccell **potf, loc_t *loc, const dmat *amp, const dmat *opdbias, const dmat *area, real thres, real wvl, const dmat *cov, real r0, real l0, long npsfx, long npsfy, long nsa, long pttr) |
dmat * | mk2dcov (loc_t *loc, const dmat *amp, real ampthres, const dmat *cov, int norm) |
Routines to generate short/long exposure OTFs of an aperture in present of atmosphere turbulence.
void genotf | ( | ccell ** | potf, |
loc_t * | loc, | ||
const dmat * | amp, | ||
const dmat * | opdbias, | ||
const dmat * | area, | ||
real | thres, | ||
real | wvl, | ||
const dmat * | cov, | ||
real | r0, | ||
real | l0, | ||
long | npsfx, | ||
long | npsfy, | ||
long | nsa, | ||
long | pttr | ||
) |
Generate OTFs for an aperture or multiple subapertures. ALl these apertures must share the same geometry, but may come with different amplitude map and/or OPD biasas. if pttr is 1, the OTF will have tip/tilt removed. make r0 to infinity to build diffraction limited OTF. make r0 to infinity and opdbias to none null to build OTF for a static map.
2020-01-21: Compute OTF using nyquist sampling and then upsample with FFT.
potf | The otf array for output |
loc | the aperture grid (same for all apertures) |
amp | The amplitude map of all the (sub)apertures |
opdbias | The static OPD bias (complex part of amp). |
area | normalized area of the (sub)apertures |
thres | The threshold to consider a (sub)aperture as full |
wvl | The wavelength. only needef if opdbias is not null |
cov | The covariance. If not supplied use r0 for kolmogorov spectrum. |
r0 | Fried parameter |
l0 | Outer scale |
npsfx | Size of PSF |
npsfy | Size of PSF |
nsa | Number of (sub)apertures |
pttr | Remove piston/tip/tilt |
Average spatially the 4-d covariance function to create a 2-d covariance function. For OPD f defined on points x (2-d coordinate), the 4-d covariance is simply <f'f> where f is vector form of the OPD and the average is over time. The 2-d covariance is additionally averaged over all the points so that B(r)=<f(x)'f(x+r)>_x,t To compute B, we first figure out the number of overlapping pairs of points for each r and then compute the averaging. When the amplitude is less than the threshold, the point does not count.