cacao-org / cacao

Compute And Control for Adaptive Optics
GNU General Public License v3.0
24 stars 9 forks source link

mfilt is multiplying the gain by the mult. fact #26

Closed jaredmales closed 1 year ago

jaredmales commented 1 year ago

https://github.com/cacao-org/cacao/blob/14be443c19e89a8251fecab7dfdd837a27773b36/AOloopControl/modalfilter.c#L1274

If I'm following the logic correctly, this has the result that the gain is being multiplied the mult. fact. So the leak and gain aren't completely independent.

Could we change this to something like

// this is the goal position
mvalDMc[mi]  = (mvalDMc[mi] * imgmmult.im->array.F[mi]) + dmval;

to make it a true leaky integrator?

jaredmales commented 1 year ago

I just made a PR to implement this. Closing due to https://github.com/cacao-org/cacao/pull/29