agb32 / dasp

DASP the Durham Adaptive optics Simulation Platform: Modelling and simulation of adaptive optics systems
https://www.dur.ac.uk/cfai/adaptiveoptics/dasp/
GNU Affero General Public License v3.0
16 stars 10 forks source link

scaoSim from daspbuilder.py not correcting for wavefront and not converging #4

Open joncox123 opened 4 years ago

joncox123 commented 4 years ago

While testing out the scaoSim code from daspbuilder.py, I question whether it is actually properly correcting from the reconstructed phase front. Basically, if I look at the "instantaneous image sc1" in daspctrl.py, the image appears heavily distorted, as if little to no correction is even occurring via the DM.

If I try to increase the number of DM actuators or WFS sub-apertures, the result actually gets worse. Looking at the DM mirror surface image, increasing number of actuators appears to make the wavefront reconstruction algorithm converge to the wrong result (seems to get stuck in some smooth local minimum that does not vary much with time).

If I switch to the Zernike DM (zdm), the behavior is similar, except that the output actually looks the best for 3 "actuators" (only tip/tilt correction). If I increase the Zernike order, it gets worse, just like the xinterp_dm. My conclusion is that the module that reconstructions the wavefront from the WFS is not working correctly (at least as the example is configured).

What I would like is to start from a working simulation configuration that does a good job correcting for the phase screen. Since DASP is used by many people, I assume the fault is with the scaoSim configuration, not a software bug. Can you please provide a fix or reply with an example configuration that illustrates DASP doing a good job correcting for the wavefront?

agb32 commented 4 years ago

Should work - usually it gives a Strehl around 65% in the default case. If its not, suggests something might be wrong with some of the libraries being used in numpy for example. What OS are you using?