As discussed, would you mind taking a look at this? The basic mechanism is very similar to
DM-2306, but dealing with shapes rather than centroids. However, there are two things which I'd appreciate your feedback on:
- I've adapted the ShapeResultKey to handle either pixel (x,y) or celestial (RA, dec) coordinates. This is slightly clunky, because it still uses x and y as variable names internally, and it means a change to the external interface. I'm certainly not wedded to this approach, and if you have a better suggestion please let me know.
- I added a free function for generating the transformation matrix required for transforming shapes. This is quite similar to functionality that's already available in afw::geom. I wondered about going for closer integration here, but decided I preferred the simplicity of the free function in meas_base. You have a better overview of other likely users of this code, though, so I would be happy to rethink this if you think it's worthwhile.
Anyway, the code is on tickets/
DM-2307 in afw, meas_base and meas_modelfit.