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
|
apertures = CircularAperture((positions['x_0'], |
, 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...)
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
photutils/photutils/psf/photometry.py
Line 256 in 97e38c3
aperture_photometry, a la thefinderandgroup_makerattributes. 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...)