Closed rmjarvis closed 1 year ago
Thanks Matt. They were relics of a copy/paste I forgot to clean up.
@rmandelb I have two reviews already, but I thought you might like to take a look at this too. Happy to hold off merging this if you are interested.
Also, thanks for your work on this feature; it's a nice addition!
Thanks Rachel! I think I addressed all the relevant docs.
This PR involves code that I've been copying around to various places (e.g. it is in the piff.Star.hsm method) knowing each time that I should really put it into GalSim directly. But it was always more expedient to just copy it. So today, as I was about to copy it yet again, I decided to do it right and add it here.
The HSM moments are natively measured in pixel coordinates. Indeed the back end code doesn't have any knowledge of the WCS. However, it's fairly straightforward to convert these (x,y) moments in to (u,v) moments using the jacobian of the WCS. This PR adds two ways the user can do this:
ShapeData.applyWCS(wcs)
converts a ShapeData instance into one where the size and shape values are based on the u,v moments rather than x,y.image.FindAdaptiveMom(use_sky_coords=True)
does this for you using the wcs that is in the image.