Add polygon aperture
This is a reminder to implement a polygon aperture based on a polygon region from the regions package. This will occur when regions is ready and we base all photutils apertures on regions.
Any updates on this feature? Arbitrary polygon apertures would be very useful.
@cooker33 We first need a polygon region to be implemented in the regions package (https://github.com/astropy/regions) before we can add a polygon aperture in photutils.
@larrybradley That's fair enough. Any advice or tips for performing photometry on fits images inside an HST-WFC3 footprint defined by a ds9 polygon?
@cooker33 You can use the pyregion (https://pyregion.readthedocs.io/en/latest/) package to load in a DS9 region file and use its get_mask function (https://pyregion.readthedocs.io/en/latest/api/pyregion.get_mask.html#pyregion.get_mask) to convert it to a boolean mask. You could then put that boolean mask into a photutils ApertureMask object (https://photutils.readthedocs.io/en/stable/api/photutils.aperture.ApertureMask.html) and use its multiply method to do the photometry (i.e. sum the result of multiply).