AOtools / soapy

A Python Adaptive Optics Simulation
GNU General Public License v3.0
85 stars 32 forks source link

Fix for LGS uplink with ShackHartmann wfs #126

Closed ojdf closed 2 years ago

ojdf commented 2 years ago

Fix for LGS uplink with using ShackHartmann wfs class. This fixes the backwards slopes issue when uplink=True, so the non-legacy version can be used. Also changed the example config file to use ShackHartmann instead of ShackHartmannLegacy.

I note that one of the changes (not flipping LGS psf) was also implemented in #98

andrewpaulreeves commented 2 years ago

Hi @ojdf - Was it a flip in the end? When we tried it out last time we found that it didnt' solve the issue. Or did we just flip at the wrong place? Either way - quick check before I merge - the LGS example now runs properly?

ojdf commented 2 years ago

@andrewpaulreeves yeah it was a flip, but in a different place. You had the flip on the LGS PSF before the convolution, which was correct but the subaps were still flipped so the slopes were backwards. What I've done is get rid of the flip before the convolution then apply it to the subaps after convolution with the LGS PSF. The LGS-uplink example now runs properly and I've changed the config file to use the non-legacy Shack Hartmann.