AstroPy - Python programs for planetary astronomy - 9/3/07

AstroPy is a collection of Python programs for processing observational planetary astronomy image data. In particular, these programs were written to process the images of Venus taken by Eliot Young, Mark Bullock, and Tanya Tavener at the NASA Infrared Telescope Facility on Mauna Kea, Hawai'i, during July of 2007. These images will be used as part of a project to create cloud-motion maps of Venus' atmosphere. All software and websites were written by Sky Coyote.


The current collection of 16 programs can be downloaded as an Apple XCode project here. XCode is used only as a project-manager/editor, and is not required to use the programs.


AstroPy requires the following installed software:

You will also need to have a properly installed C compiler and libraries (e.g. gcc 4.0.1 on the Mac) in order to compile the C files that are part of these packages.

Data directory layout

Many of the AstroPy programs expect a standard directory layout for raw and processed data. For the July 2007 datasets, these directories look like the following:

These are:

VenusData     : Top level of all data.

072307        : Directories for individual days.

raw           : Raw images, usually with file names in 'im%04d.a.fits' format.
intermediates : Intermediate processing files such as 'mask.fits', 'intercept.fits', 
                'slope.fits', sharpness and coordinate text files, etc...
processed     : Processed images, also with file names in 'im%04d.a.fits' format.
etc           : Observing logs, original .tar file, screenshots, etc...

AstroPy expects symbolic links (created with 'ln -s' under Unix/OSX) to the daily directories in its own directory:

Individual program pages

These are listed in roughly the order you might use them. See the individual pages for details. Note that '' performs all the operations of rough alignment, flattening, filling, shift averaging, and medium alignment, and will perform additional operations as they become available. Most files exist primarily as importable modules, with some __main__ test code at the bottom.

  1. Classes for 1d, 2d, and image plots.
  2. Plot a single FITS file.
  3. Browse a directory of FITS images.
  4. Make mask, intercept, and slope images from two sets of sky flats.
  5. Fit a circle to a set of points.
  6. Fit a circle to a planet image based on rough limb estimation.
  7. Scan the output of '' for bad images based on resulting circles.
  8. Transform an image using mask, intercept, and slope to compensate for individual pixel responses.
  9. Interpolate the masked part of an image.
  10. Shift an image based on integer or floating point coordinates.
  11. Fit a circle to a planet image based on better limb estimation.
  12. Perform all steps of image processing.
  13. Estimate the sharpness of one or more FITS images.
  14. Plot the results of ''.
  15. Merge the results of ''.
  16. Stack and average a set of images.

Other links

FITSRegister: Semi-automatic alignment of multiple astronomical images.

FITSFlow: Automatic flow estimation between astronomical images.

FITSMap: Latitude/longitude projection mapping for astronomical images.

Venus project: Previous work on detection, visualization, and analysis of cloud motion.

İSky Coyote 2007