Aperture photometry

Photutils is an affiliated package of Astropy to provide tools for detecting and performing photometry of astronomical sources.

Example of star identification using a sourced image: JC:

  • hdu_list = fits.open('filename')
  • imgdata = hdu_list[0].data #if extracting data
  • image = hdu.data[500:700, 500:700].astype(float) #select image subset copying array as a float
  • image -= np.median(image) #subtract estimate of background using image median. Is this ok?
  • bkg_sigma = mad_std(image) #background sigma estimated using median abs deviation of image
  • daofind = DAOStarFinder(fwhm=4., threshold=3.*bkg_sigma) #Find stars: set detection threshold at 3 sigma


  • parameters of detected sources returned in astropy table:
  • positions = (sources['xcentroid'], sources['ycentroid']) #accessing position related columns
  • apertures = CircularAperture(positions, r=4.) #circular aperture radius = 4 pixels
  • phot_table = aperture_photometry(image, apertures) #input 2D array (bk subtracted) output QTable
  • returned QTable:

  • plt.imshow()
  • apertures.plot

plot of mean vs exposure time taking the log of the x axis:


Found an aperture photometry sofware that would allow us to prefectly select the area in which we are interested.

Aperture Photometry Tool (APT) is software for astronomical research, as well as for learning, visualizing and refining aperture-photometry analyses. Image overlays, graphical representations, statistics, models, options and controls for aperture-photometry calculations are brought together into a single package. Professional astronomers appreciate APT’s rich set of features and functions, and you will, too. APT is free of charge under a license that limits its use to astronomical research and education. It is perfect for the science center, observatory, and classroom. Also, it is quite simply the best FITS-image viewer you will find. Click here for a tutorial on Aperture Photometry Tool.

The software produces histograms, background analysis and so much more. We can estimate the brithness of each star in a image.



Features and functions:


A paper about the software, describing what the software can be used for and some instruction on performing certain data analyses:


Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng CircularAperture.png r1 manage 72.1 K 08 Nov 2018 - 12:01 JacobChambers  
PNGpng DAOStarFinder1.png r1 manage 165.8 K 08 Nov 2018 - 11:51 JacobChambers  
PNGpng DAOStarFinder2.png r1 manage 138.3 K 08 Nov 2018 - 11:51 JacobChambers  
PNGpng aperture_photometry1.png r1 manage 194.2 K 08 Nov 2018 - 12:07 JacobChambers  
PNGpng aperture_photometry2.png r1 manage 115.3 K 08 Nov 2018 - 12:07 JacobChambers  
PNGpng aperturephotometryex.png r1 manage 113.0 K 08 Nov 2018 - 11:45 JacobChambers  
PNGpng logplot.png r1 manage 13.5 K 08 Nov 2018 - 13:24 AriannaSaba  
PNGpng mad_std.png r1 manage 32.0 K 08 Nov 2018 - 11:44 JacobChambers  
PNGpng table1.png r1 manage 65.6 K 08 Nov 2018 - 11:57 JacobChambers  
PNGpng table2.png r1 manage 41.4 K 08 Nov 2018 - 11:57 JacobChambers  
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions

Physics WebpagesRHUL WebpagesCampus Connect • Royal Holloway, University of London, Egham, Surrey TW20 0EX; Tel/Fax +44 (0)1784 434455/437520

Topic revision: r2 - 08 Nov 2018 - JacobChambers

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding RHUL Physics Department TWiki? Send feedback