Addition of pill-like aperture?
- Dominant language
- Python
- Stars
- 307
- Forks
- 156
- Avg merge
- 56m
- Merged PRs (30d)
- 58
Description
I have made and been using the pill type aperture. ([here](https://github.com/ysBach/ysphotutilpy/blob/master/ysphotutilpy/aperture.py#L445). I named it `PillBox` as it is a combination of elliptical and rectangular("box") aperture, but I think `Pill` is a better name)
**Pill type aperture** is useful for **trailed objects** (non-sidereal observation like asteroids and comets).
A figure from Fraser et al 2016 (http://dx.doi.org/10.3847/0004-6256/151/6/158) with some annotations:

Their package is [TRIPPy](https://github.com/fraserw/trippy)
Thanks to elliptical aperture in photutils, I could make the rounded parts at the ends in elliptical shape. This has been used in some publications I was involved in (e.g., [Ishiguro, Bach et al. MNRAS (2022)](https://doi.org/10.1093/mnras/stab3198)). One difficulty is that, as I heavily followed the internal form of other apertures (such as `EllipticalAperture` class), when the internal API in `photutils` changes, some users and my class students complain my package raises `ImportError`s. Thus, I think it maybe beneficial if this `PillAperture` and related codes can be included into photutils.
If you think it is reasonable, I will try to make a PR (may take a few weeks though). How do you think?
Contributor guide
Research direction
Start with the linked implementation in ysphotutilpy/aperture.py around line 445, including the PillBox/PillAperture design, and compare it with the existing aperture classes referenced in the issue. Determine the API and scope for adding a pill-shaped aperture to photutils; done requires a maintainer-approved design and a complete PR plan.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100