MAOS
Multithreaded Adaptive Optics Simulator
gensei.h File Reference

Functions

void upsample_otf (cmat *out, const cmat *in)
 
cccellgenseotf (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, int notfx, int 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)
 

Detailed Description

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.

Todo:
find ways to factor in outerscale effect (use von karman spectrum instead of kolmogorov)

Function Documentation

◆ genseotf()

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.

Parameters
[in]ptssubaperture low left coordinate
[in]amp_amplitude map. can be dcell or dmat
[in]opdbiasopd bias for otf.
[in]saa_list of subaperture area, can be dcell or dmat
[in]wvllist of wavelength
[in]r0Fried parameter
[in]L0Outer scale
[in]embfacEmbedding factor, normally 2

◆ gensepsf()

void gensepsf ( dccell **  psepsfs,
const cccell otfs,
const cccell lotf,
const_anyarray  saa_,
const dmat wvl,
int  npsfx,
int  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.

Parameters
[out]psepsfsPSF. The sampling depends on sampling of OTF and notfx
[in]otfsOTFs of down link
[in]lotfOTFs of uplink, optional
[in]saa_subaperture area, optional
[in]wvlwavelength
[in]npsfxPSF x dimension. optional. If specified, the psf will be padded by 0 or truncated
[in]npsfyPSF y dimension. optional. If specified, the psf will be padded by 0 or truncated

◆ gensei()

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.