Annulus region masks restricted to mode='center'
- Dominant language
- Python
- Stars
- 65
- Forks
- 64
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 4
Description
Currently annulus regions (e.g. `CircleAnnulusPixelRegion`) are implemented as Compound regions and Compound region masks are restricted to use only `mode='center'` (see https://github.com/astropy/regions/blob/main/regions/core/compound.py#L68). This makes sense for generic user-defined generic regions, but not for the provided `CircleAnnulusPixelRegion`, `EllipseAnnulusPixelRegion`, and `RectangleAnnulusPixelRegion` objects for which the other `modes` are well-defined. For example, it's not currently possible to perform "exact" aperture photometry with any of these provided annulus region objects.
I thought that originally the annulus region masks could use other overlap modes (e.g., `photutils` provides this), so I suspect that this behavior changed at some point when the annulus regions were refactored. Perhaps it was unintended.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with regions/core/compound.py, especially the mode restriction, then inspect CircleAnnulusPixelRegion, EllipseAnnulusPixelRegion, and RectangleAnnulusPixelRegion. Confirm that the provided annulus regions support the well-defined overlap modes, including exact, so exact aperture photometry can use each one.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100