Add option to set the method for aperture photometry measurements in the PSF photometry loop
- Dominant language
- Python
- Stars
- 307
- Forks
- 156
- Avg merge
- 56m
- Merged PRs (30d)
- 58
Description
Right now the PSF photometry machinery depends on doing CircularAperture photometry to make initial flux estimates. That makes sense for many use cases, but there are some situations where you don't want to do that. E.g., if your model is highly elliptical, or you know the image is very crowded, or you just don't like the default aperture sizes.
So I'd suggest taking the code that currently does it (For example https://github.com/astropy/photutils/blob/97e38c3e507871af5d18219012b345c15509b9ce/photutils/psf/photometry.py#L256 , although it also appears 2 other places), and replacing it with a new attribute `aperture_photometry`, a la the `finder` and `group_maker` attributes. The current situation could be left as the default (It could just be a function given that it's really quite simple), but then the user has the option to swap in there own way of doing it.
Does this make sense to you @mirca ? (I can try to implement it myself if you don't think you'll have time, but either way it'd be good to get your opinion...)
Contributor guide
Research direction
Start in photutils/psf/photometry.py around the cited line and locate the other two places where CircularAperture photometry is performed in the PSF photometry loop. Review how the finder and group_maker attributes are configured, then verify that a replaceable aperture_photometry option preserves the current behavior by default and allows a custom method.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100