+15

Pythonic framework for PSF photometry

Thomas Robitaille 9 years ago updated by Mikołaj 7 years ago 8

It would be great to have a robust and Pythonic PSF photometry framework that could be used seamlessly with Astropy objects (such as images with WCS information) to fit single or multiple blended sources.


The photutils package includes well developed functionality for aperture photometry, but only very experimental support for PSF/PRF photometry. This feature request is for the PSF/PRF photometry framework to be developed into a fully-fleged and robust framework.


See here for related issues in the photutils package.

Note that a lot of progress in this direction has been happening in this pull request of photuils. That will probably be in very soon, and be in need of some user testing and feedback.

I should also note that I've been working on implementing crowded field psf photometry for a while in the astropyp (astronomy pypeline) package. Unfortunately the documentation will be lacking until I graduate this summer but I've been able to get 2-5% photometry in crowded fields in Sco-Cen, which stretches across the galactic plane in the southern sky (there are some examples in the repository but some of them are out of date). I've tested it on SDSS fields taken with DECam as well as simulated photometry but have not done robust testing outside of my own data.


astropyp also has code to get an astrometric solution (without using SCAMP) and stack images (using multiprocessing) with no WCS information. Expect to see more updates and documentation in the fall when I start my postdoc. I hope that most of this will eventually get integrated into photutils and astropy but there are likely to be some higher level functions that will remain in astropyp.

@Fred Moolekamp: have you had a look at the changes to PSF machinery in photutils (the PR I linked above)? It might be worth your while to start thinking sooner rather than later about how to fit your machinery into that framework. If we do end up having a GSoC student working on this for the coming summer, that might be a good opportunity.

Unfortunately I'm finished using this part of my code until after my thesis is finished and don't have time to refactor it. But if a GSoC student is working on this over the summer I would be happy to assist him/her so that the best pieces of both modules could be put together into a useful tool.

Note that there's a lot of activity in this direction going on as part of the JWST Data Analysis Tools sprints, along side the Google Summer of Code project. So folks should watch the photutils.psf space in the near future!

With photutils v0.3 is out, maybe we can close this topic? Obviously more things can be done, but photutils.psf is there and ready to be used/tried out.

I think the functionality in photutils.psf is not quite up to what the original post here called for: it is not yet " fully-fleged and robust" in that it's only just made it into a release, and it still doesn't have full wcs and nddata support. So I think we want to leave this open until then just to help us prioritize efforts.

As a part of astwro package I've made Peter Stetson's daophot wrapper pydaophot.

Sample notebook shows how it works.


(package does not contain daophot itself)