MAOS
Multithreaded Adaptive Optics Simulator
mkh.h File Reference

Functions

dspmkht_cubic (const loc_t *locin, const loc_t *locout, real displacex, real displacey, real scale, real angle, real iac)
 
dspmkh_cubic (const loc_t *locin, const loc_t *locout, real displacex, real displacey, real scale, real angle, real iac)
 
dspmkht (const loc_t *locin, const loc_t *locout, real displacex, real displacey, real scale, real angle)
 
dspmkh (const loc_t *locin, const loc_t *locout, real displacex, real displacey, real scale, real angle)
 
dspmkhbin1d (const dmat *xin, const dmat *xout)
 

Detailed Description

Contains functions that create ray tracing operator

Function Documentation

◆ mkht_cubic()

dsp* mkht_cubic ( const loc_t locin,
const loc_t locout,
real  displacex,
real  displacey,
real  scale,
real  angle,
real  cubic_iac 
)

Create transpose of ray tracing operator from locin to locout using cubic influence function that can reproduce piston/tip/tilt.

◆ mkh_cubic()

dsp* mkh_cubic ( const loc_t locin,
const loc_t locout,
real  displacex,
real  displacey,
real  scale,
real  angle,
real  cubic_iac 
)

Transposes the result from mkht_cubic.

◆ mkht()

dsp* mkht ( const loc_t locin,
const loc_t locout,
real  displacex,
real  displacey,
real  scale,
real  angle 
)

Create transpose of mkh() raytracing matrix. The ray (opd) starts from locin and land in locout.

Parameters
locinThe input grid
locoutThe target grid
displacexShift of the beam at the input grid along x
displaceyShift of the beam at the input grid along y
scaleScaling of the beam from target to input grid. (scale < 1 if beam is coming from a point source)
angleRotation of the target grid (Clock-wise) (applied before displacex and displacey).

◆ mkh()

dsp* mkh ( const loc_t locin,
const loc_t locout,
real  displacex,
real  displacey,
real  scale,
real  angle 
)

Create ray tracing operator from coordinate locin to locout. Locin is required to be evenly spaced.

If vector Pin is defined on locin, Pout is defined on locout, H=mkh(locin, locout, ...), Pout=H*Pin does the bilinear interpolation.

If locin->iac is non zero, will call mkh_cubic to produce a cubical interpolation.

A cubic influence function that can reproduce piston/tip/tilt is coined by Ellerbroek to model the piezostack DM actuator. The influence has the form

\[ h(x;x_{i};\delta)=h_{0}((x-x_{i})/\delta) \]

where \(\delta\) is the same as the grid spacing, and \(h_{0}\) is the influence function defined in the normalized coordinates

\begin{eqnarray*} h_{0}(x)=\frac{1}{1+2c}\begin{cases} 1+(4c-\frac{5}{2})|x|^{2}+(\frac{3}{2}-3c)|x|^{3} & |x|\leq1\\ (2c-\frac{1}{2})(2-|x|)^{2}+(\frac{1}{2}-c)(2-|x|)^{3} & 1<|x|\leq2\\ 0 & |x|>2\end{cases}\end{eqnarray*}

where c is the nearest neighbor coupling frequency. The leading coefficient is to normalize the influence function so that it sums to 1.

◆ mkhbin1d()

dsp* mkhbin1d ( const dmat xin,
const dmat xout 
)

Create a matrix to bin from coordinate xin to xout using bilinear interpolation. xin and xout should be 1-d arrays of coordinates. We require the coordinates to order incrementally monotonically, but do not require them to be evenly spaced.