Photutils/IRAF Starfinder: Give Total Counts

390 Views Asked by At

I've been using IRAF Starfinder from the photutils package to identify sources from a fits image, or rather from the 2D array extracted from a fits image. The identificaiton of the sources seems to be working pretty well, and I get an astropy table with all the usual parameters. However, I'm looking to simply get the total counts of the sources (total count meaning the sum of the values of the pixels within the radius of the source). I realise the radius also isn't defined here, but some factor of the FWHM should suffice here. The flux parameter seems to be the closest thing to what I want, but in the documentation it describes this as the object flux calculated as the peak density in the convolved image divided by the detection threshold, which isn't what I'm after. Is there an easy way to do this? I'm very new to these packages and this form of analysis in general, so apologies if this is an obvious/silly question. Thank you for your time!

1

There are 1 best solutions below

4
keflavich On

You're asking for aperture photometry. Check out the examples on this page:

https://photutils.readthedocs.io/en/stable/detection.html

They start with the catalog, like the one you have in hand (source positions), and create a set of circular apertures with radius r=4:

>>> apertures = CircularAperture(positions, r=4.)

Once created, you can use the apertures to extract sums, etc. as per https://photutils.readthedocs.io/en/stable/aperture.html#performing-aperture-photometry:

>>> phot_table = aperture_photometry(data, aperture)