MAOS
Multithreaded Adaptive Optics Simulator
|
Functions | |
dcell * | genactcpl (const dspcell *HA, const dmat *W1) |
dspcell * | slaving (loccell *aloc, const dcell *actcpl, const lcell *actstuck, const lcell *actfloat, real thres, real scale, int mode) |
void | act_stuck (loccell *aloc, anyarray HA, const lcell *stuck) |
void | act_zero (loccell *aloc, const dcell *HB, const lcell *dead) |
void | act_float (loccell *aloc, dspcell **HA, const dcell *HB, const lcell *actfloat) |
void | act_stuck_cmd (loccell *aloc, const dcell *adm, const lcell *stuck) |
dspcell * | act_float_interp (loccell *aloc, const lcell *actfloat) |
dsp * | act_extrap_each (loc_t *aloc, const dmat *actcpl, real scl) |
dspcell * | act_extrap (loccell *aloc, const dcell *actcpl, real scl, int lor) |
Routines to compute interpolation matrices for stuck and floating actuators.
Compute the actuator coupling coefficient to be used to identify non-coupled actuators. W1 is optional weighting function. The max value is 1.
dspcell* slaving | ( | loccell * | aloc, |
const dcell * | actcplc, | ||
const lcell * | actstuck, | ||
const lcell * | actfloat, | ||
const real | thres, | ||
const real | sclsq, | ||
const int | mode | ||
) |
Compute slaving actuator regularization term.
Inactive actuators (coupling coefficiency below the threshold) are slaved to neighbors that are active.
The result is S=H'H; Let b=H*a, we have if mode==1: b(isa)=alpha(a(isa)-sum(a(jsa).*weight(jsa))), where isa is inactive and jsa are neighoring active actuators. if mode==2: b(igroup)=alpha*sum(a(jsa)), where jsa are fully active actuators belonging to igroup if mode==3: b(isa)=alpha*sum(a(jsa)-a(ksa)), where isa is inactive, and jsa and ksa are neighrboring and opposite active actuator
[in] | aloc | The actuator grid |
[in] | actcplc | Actuator coupling coefficiency |
[in] | actstuck | mask for stuck actuators that will not be slaved, but have value constrained. |
[in] | actfloat | mask for float actuators that will be slaved, but not have value constrained. |
[in] | thres | The threshold that an actuator is deemed slave |
[in] | sclsq | Expected norm of the slaving matrix. |
[in] | mode | Mode of operation. (1 or 2) |
When some actuators are stuck, zero the corresponding column in HA
Zero out rows of dead actuators in mode vector.
When some actuators are float, remove the corresponding column in HA and/or HB, and add to neighboring actuators. This is implemented using a second matrix and then add to the original matrix.
aloc | coordinate of actuators |
HA | sparse matrix to modify |
HB | dense matrix to modify |
actfloat | floating actuator mask |
Make DM actuator commands zero at stuck actuator locations.
[in] | aloc | Actuator grid array |
[in,out] | adm | Actuator command to process |
[in] | stuck | List of stuck actuators |
Create an interpreter that make floating actuators equal to their neighbors.
[in] | aloc | Actuator grid array |
[in] | actfloat | List of floating actuators |
Create an extrapolator that does the following
Create an extrapolator that make inactive actuators equal avearage of active neighbors if exist or all other neighbors.
[in] | aloc | Actuator grid array |
[in] | actcplc | Actuator coupling coefficiency |
[in] | thres | Threshold of coupling to turn on interpolation |
[in] | lor | Low order mode removal before extrapolation |