astropy / photutils

Astropy package for source detection and photometry. Maintainer: @larrybradley
https://photutils.readthedocs.io
BSD 3-Clause "New" or "Revised" License
231 stars 131 forks source link

How to deal with background? #1758

Closed dan-adi closed 1 month ago

dan-adi commented 1 month ago

Hello, I'm learning star photometry using photutils, and I'm a bit confused about background subtraction. Reading the examples in the documentation, aperture_photometry expects the image to be background subtracted. But if I use circular annulus to estimate local background contribution does it make sense to subtract the background globally before?

I see two possibilities:

  1. Globally subtract the image background as a first step, then don't use circular annulus
  2. Don't do a global subtraction and use local background subtraction within circular annulus stats

Am I missing something?

larrybradley commented 1 month ago

@dan-adi photutils provides tools for both global and local background subtraction. How you use these tools will depend on your particular science case and data. My general recommendation would be to start with a global background subtraction, and then additionally use local-background subtraction only if needed (e.g., complex and varying backgrounds).