MAOS
Multithreaded Adaptive Optics Simulator
|
Data Structures | |
struct | genatm_t |
Functions | |
map_t * | genatm_simple (real r0, real L0, real slope, real dx, long nx, int seed) |
dmat * | genatm_loc (loc_t *loc, real r0, real L0, real slope, int seed) |
mapcell * | genscreen (genatm_t *data) |
mapcell * | genscreen_str (const char *keywords) |
dmat * | turbcov (dmat *r, real rmax, real r0, real L0) |
void | spatial_psd (dmat **out, long nx, long ny, real dx, real strength, real L0, real fmin, real fmax, real slope, real power) |
dmat * | turbpsd (long nx, long ny, real dx, real r0, real L0, real slope, real power) |
real | calc_aniso (real r0, int nht, real *ht, real *wt) |
real | calc_greenwood (real r0, int nps, real *ws, real *wt) |
real | calc_aniso2 (real r0, int nht, real *ht, real *wt, real hc1, real hc2) |
Contains routines to generate atmospheric turbulence screens
struct genatm_t |
Data Fields | ||
---|---|---|
rand_t * | rstat |
The random stream |
real * | wt |
The layer weights |
real | r0 |
The Fried Parameter |
real * | L0 |
The outer scale |
real | dx |
The sampling |
real | fmin |
Minimum spatial frequency |
real | fmax |
Maximum spatial frequency |
real | slope |
Power slope of PSD. -11/3 for Von Karman, -4 for Biharmonic. -1 for fractal. |
long | nx |
Number of pixels along x |
long | ny |
Number of pixels along y |
long | nlayer |
The number of layers |
long | ninit |
In Fractal method, the size of initial screen |
long | share |
Use file backend for sharing of atmosphere |
dmat * | r0logpsds |
Spatial PSD of log(r0) (m)=beta*f^alpha. [alpha, beta, minfreq, maxfreq] |
dcell * | screen |
The destination screen pointer |
A simpler interface to gerate a single screen.
Generate atmosphere and map onto loc.
Generates multiple screens from spectrum. Note that if data->share=1, the atmosphere will be different from data->share=0 due to different algorithms used.
mapcell* genscreen_str | ( | const char * | keywords | ) |
Generate screen according to a header. It has multiple possible options. 1) If is a filename. load from file 2) if mode and petal is not set. generate screen from PSD with the following keys L0 (Outer scale) slope (optional, default is -11/3) seed (optional) 3) If mode is set. generate from a zernike mode with the following keys mode (zernike mode) 4) If petal is set. generate randomized petal modes each with rms value. petal sets total number of petals theta0 sets petal gap orientation angular offset in radian. 0 means a gap is along y axis. seed piston: generates piston mode if set tip: generate tip mode if set tilt: generates tilt mode if set The following common parameters are used: r0 (Fried parameter in m) or rms (in nm) dx (sampling) nx (number of points)
Compute the covariance for separation of r, and put the values in cov. In kolmogorov spectrum, the variance are defined as half of the structure function between two points separated by rmax.
void spatial_psd | ( | dmat ** | pout, |
long | nx, | ||
long | ny, | ||
real | dx, | ||
real | strength, | ||
real | outerscale, | ||
real | minfreq, | ||
real | maxfreq, | ||
real | slope, | ||
real | power | ||
) |
Creates 2-d PSD at size nx*ny: psd=(strength*(f^2+L0^-2)^(slope/2))^power. Zero frequency component is in the corner P(psd,0).
pout | Output |
nx | The size |
ny | The size |
dx | The sampling of spatial coordinate. |
strength | Strength coefficient |
outerscale | Outerscale |
minfreq | Low end frequency cut off |
maxfreq | High end frequency cut off |
slope | should be -11/3 for von karman or kolmogorov screens, or -4 for biharmonic screen (just testing only). |
power | optionally do a power of psd. |
Compute spatial PSD of turbulence spectrum.
real calc_aniso | ( | real | r0, |
int | nps, | ||
real * | ht, | ||
real * | wt | ||
) |
Estimate anisoplanatic angle theta0 from Fried parameter r0, layer height and weights.
real calc_greenwood | ( | real | r0, |
int | nps, | ||
real * | ws, | ||
real * | wt | ||
) |
Estimate Green wood frequency
real calc_aniso2 | ( | real | r0, |
int | nps, | ||
real * | ht, | ||
real * | wt, | ||
real | hc1, | ||
real | hc2 | ||
) |
Estimate generalized aniso angle theta2 from Fried parameter r0, and layer height and weights, and deformable mirror conjugation heights hc1 hc2 of the ground and altitude DMs.