GalSim-developers / GalSim

The modular galaxy image simulation toolkit. Documentation:
http://galsim-developers.github.io/GalSim/
Other
224 stars 105 forks source link

Add ability to project shear to and from world coordinates #1172

Closed rmjarvis closed 2 years ago

rmjarvis commented 2 years ago

This is a quick feature addition requested by @beckermr. It's actually code that I have copied around a few places when I needed to do this, and he pointed out that it is probably widely useful enough to be put into GalSim.

Basically, wcs.toWorld(shear) will now return the equivalent shear in world coordinates when the input is the measured shear in image coordinates (e.g. from HSM).

rmjarvis commented 2 years ago

The test suite has some pretty crazy WCS's with very non-square pixels. One was distorted enough that I had to put the |g| < 0.8 guard in for hsm, since the image was coming back as practically a straight line and hsm couldn't do anything useful with it. But yeah, a number of the others were quite non-trivial tests of the math.