The purpose of this text is to walk through image reduction and photometry using Python, especially Astropy and its affiliated packages. It assumes some basic familiarity with astronomical images and with Python. The inspiration for this work is a pair of guides written for IRAF, "A User's Guide to CCD Reductions with IRAF" (Massey 1997) and "A User's Guide to Stellar CCD Photometry with IRAF" (Massey and Davis 1992).
The focus is on optical/IR images, not spectra.
This guide was written by Matt Craig and Lauren Chambers. Editing was done by Lauren Glattly.
New contributors will be moved from the acknowledgments to the author list when they have either written roughly the equivalent of one section or provided detailed review of several sections. This is intended as a rough guideline, and when in doubt we will lean towards including people as authors rather than excluding them.
Funding
Click here to comment on this section on GitHub (opens in new tab).
Made possible by the Astropy Project and ScienceBetter Consulting through financial support from the Community Software Initiative at the Space Telescope Science Institute.
Acknowledgments
Click here to comment on this section on GitHub (opens in new tab).
The following people contributed to this work by making suggestions, testing code, or providing feedback on drafts. We are greatful for their assistance!
- Lia Corrales
- Kelle Cruz
- Richard Hendricks
- Stuart Littlefair
- Isobel Snellenberger
- Kris Stern
- Thomas Stibor
If you have provided feedback and are not listed above, we apologize -- please open an issue here so we can fix it.
Resources
Click here to comment on this section on GitHub (opens in new tab).
This astronomical content work was inspired by, and guided by, the excellent resources below:
- "A User's Guide to CCD Reductions with IRAF" (Massey 1997) is very thorough, but IRAF has become more difficult to install over time and is no longer supported.
- "A User's Guide to Stellar CCD Photometry with IRAF" (Massey and Davis 1992).
- The Handbook of Astronomical Image Processing by Richard Berry and James Burnell. This provides a very detailed overview of data reduction and photometry. One virtue is its inclusion of real images with defects.
- The AAVSO CCD Obseving Manual provides a complete introduction to CCD data reduction and photometry.
- A Beginner's Guide to Working with Astronomical Data is much broader than this guide. It includes an introduction to Python.
Software setup
Click here to comment on this section on GitHub (opens in new tab).
The recommended way to get set up to use this guide is to use the Anaconda Python distribution (or the much smaller miniconda installer). Once you have that, you can install everything you need with:
conda install -c astropy ccdproc photutils ipywidgets matplotlib
Data files
Click here to comment on this section on GitHub (opens in new tab).
The list of the data files, and their approximate sizes, is below. You can either download them one by one, or use the download helper included with these notebooks.
Use this in a terminal to download the data
Click here to comment on this section on GitHub (opens in new tab).
$ python download_data.py
Use this in a notebook cell to download the data
Click here to comment on this section on GitHub (opens in new tab).
%run download_data.py
List of data files
Click here to comment on this section on GitHub (opens in new tab).
- Combination of 100 bias images (26MB) (DOI: https://doi.org/10.5281/zenodo.3320113)
- Single dark frame, exposure time 1,000 seconds (11MB) (DOI: https://doi.org/10.5281/zenodo.3312535)
- Combination of several dark frames, each 1,000 exposure time (52MB) (DOI: https://doi.org/10.5281/zenodo.2634177)
- Combination of several dark frames, each 300 sec (7MB) (DOI: https://doi.org/10.5281/zenodo.3332818)
- "Example 1" in the reduction notebooks: Several images from the Palomar Large Format Camera, Chip 0 (162MB) (DOI: https://doi.org/10.5281/zenodo.3254683)
- "Example 2" in the reduction notebooks: Several images from an Andor Aspen CG16M (483MB) (DOI: https://doi.org/10.5281/zenodo.3245296)