MAOS
Multithreaded Adaptive Optics Simulator
|
Data Structures | |
struct | dtf_t |
struct | etf_t |
Macros | |
#define | dtf_free(dtfs) if(dtfs){dtf_free_do(dtfs); dtfs=NULL;} |
#define | etf_free(etfs) if(etfs){etf_free_do(etfs); etfs=NULL;} |
Functions | |
void | dtf_otf (dmat **nominal, long notfx, long notfy, real pdthetax, real pdthetay, real pixrot, real pixblur, int treat) |
dtf_t * | mkdtf (const dmat *wvls, real dxsa, real embfac, long notfx, long notfy, long pixpsax, long pixpsay, real pixthetax, real pixthetay, const dmat *pixoffx, const dmat *pixoffy, real pixblur, const dcell *pixrot) |
etf_t * | mketf (const dtf_t *dtfs, const_anyarray sodium, int icol, const dcell *srot, const dcell *srsa, real hs, real htel, real za_rad, int no_interp) |
void | dtf_free_do (dtf_t *dtfs) |
void | etf_free_do (etf_t *etfs) |
dmat * | smooth (const dmat *profile, real dxnew) |
dcell * | smooth_cell (const dcell *profile, real dxnew) |
Routine to generate detector transfer function and elongation transfer function due to sodium layer.
struct dtf_t |
contains the data associated with a detector transfer function for a subaperture. The PSF is computed as \(\textrm{PSF}=\frac{1}{N^2\sum(\textrm{amp}^2)}|\textrm{fftshift}\mathcal{F}[A \exp(-\frac{2\pi}{\lambda}\textrm{opd})]|^2\). The subaperture image is computed as \(I=\textrm{si}*\mathcal{F}^{-1}[\mathcal{F}[\textrm{PSF}\times\textrm{nominal}]]\)
Data Fields | ||
---|---|---|
dcell * | nominal |
The FFT of the pixel functions, don't apply if etf exists . |
dspcell * | si |
The pixel selection |
real | wvl |
Wavelength |
real | dtheta |
Sampling of PSF |
cmat * | Ux |
Special frequency vector along x |
cmat * | Uy |
Special frequency vector along y |
real | dxsa |
Subaperture size |
real | pixthetax |
Pixel size along x (radial) |
real | pixthetay |
Pixel size along y (radial |
int | notfx |
FFT size along x |
int | notfy |
FFT size along y |
int | pixpsax |
Number of pixels along x |
int | pixpsay |
Number of pixels along y |
int | radpix |
1: Pixels are along radial/azimuthal direction |
int | nwvl |
Number of dtf_t |
struct etf_t |
#define dtf_free | ( | dtfs | ) | if(dtfs){dtf_free_do(dtfs); dtfs=NULL;} |
frees dtf_t
#define etf_free | ( | etfs | ) | if(etfs){etf_free_do(etfs); etfs=NULL;} |
frees etf_t
void dtf_otf | ( | dmat ** | nominal, |
long | notfx, | ||
long | notfy, | ||
real | pdthetax, | ||
real | pdthetay, | ||
real | pixrot, | ||
real | pixblur, | ||
int | treat | ||
) |
Create a OTF for pix blur and pixel binning effect
notfx,notfy | size of FFT |
pixrot | Rotation of pixel array against PSF (polar coordinate) |
pdtheta | Ratio of pixel dtheta vs PSF dtheta squared. |
pixblur | Pixel blur sigma(fraction of pixel) |
dtf_t* mkdtf | ( | const dmat * | wvls, |
real | dxsa, | ||
real | embfac, | ||
long | notfx, | ||
long | notfy, | ||
long | pixpsax, | ||
long | pixpsay, | ||
real | pixthetax, | ||
real | pixthetay, | ||
const dmat * | pixoffx, | ||
const dmat * | pixoffy, | ||
const real | pixblur, | ||
const dcell * | pixrot | ||
) |
mkdtf() computes the parameters used to sample PSFs onto detectors in the Fourier domain. It incorporates size of the detector pixels, and charge diffusion. For polar coordinate detectors, it also rotates the pixels and pixel coordinates so that they are aranged along the radial and azimuthal direction.
wvls | List of wavelength |
dxsa | Subaperture size |
embfac | Embedding factor (2) |
notfx | FFT size along x |
notfy | FFT size along y |
pixpsax | Number of pixels along x(r) |
pixpsay | Number of pixels along y(a) |
pixthetax | Pixel size along x (r) |
pixthetay | Pixel size along y (a) |
pixoffx | offset of image center from center of pixel array, along x or radial |
pixoffy | offset of image center from center of pixel array, along y or azimuthal |
pixblur | Pixel blur sigma(fraction of pixel) |
pixrot | Rotation angle of pixels islands in each subaperture. for polar coordinate only |
etf_t* mketf | ( | const dtf_t * | dtfs, |
const_anyarray | sodium, | ||
int | icol, | ||
const dcell * | srot, | ||
const dcell * | srsa, | ||
real | hs, | ||
real | htel, | ||
real | za_rad, | ||
int | no_interp | ||
) |
dtfs | The dtfs |
sodium | The sodium profile. First column is coordinate. |
icol | Which sodium profile to use |
srot | Rotation angle of each subaperture. NULL for NGS WFS |
srsa | Subaperture to LLT distance |
hs | Guide star focus range |
htel | Telescope altitude |
za_rad | Telescope zenith angle in radian |
no_interp | Use direct sum instead of interpolation + FFT. Slower |