Contribute Media
A thank you to everyone who has made this possible: Read More

WCSAxes: A Framework for Plotting Astronomical and Geospatial Data

Summary

I will present WCSAxes, a new framework for plotting astronomical data that seamlessly handles the plotting of ticks, tick labels, and grid lines for arbitrary coordinate systems and projections. While originally written for with astronomical data, it can be used for any kind of map provided that the projection and coordinate system can be represented by a pixel-to-world transformation.

Description

Astronomical data (whether images on the sky, or other data) are typically stored with information about their corresponding projection (Gnomonic, Mercator, Conical, Aitoff, and many more) and coordinate system (Equatorial, Galactic, Ecliptic, and so on).

I will present WCSAxes, a new framework for plotting such astronomical data, developed as part of the Astropy project. WCSAxes consists primarily of a Matplotlib Axes sub-class that seamlessly handles the plotting of ticks, tick labels, and grid lines for arbitrary coordinate systems and projections.

As an example, the following plot was produced with WCSAxes:

The Galactic center as seen by the Chandra X-ray observatory

The Galactic Center as seen by Chandra

(Image Credit: NASA/CXC/UMass/D. Wang et al. - http://chandra.harvard.edu/photo/2009/gcenter/)

Since it is a sub-class of the Matplotlib Axes class, all the default Matplotlib methods such as plot, scatter, imshow, contour, as well as patches, lines, collections, and so on are supported, and WCSAxes - in combination with Matplotlib's ability to accept arbitrary transformations - makes it very easy to define whether the plotting should apply to pixel coordinates, or a world coordinate system related to the data.

WCSAxes has been designed as a framework that can be easily used in other Python tools, and it is planned for inclusion in Glue, APLpy, and other astronomical tools. While originally written for Astronomical images, it should be easily extendable to any kind of map (such as Earth-based geospatial data) provided that the projection and coordinate system can be represented by a pixel-to-world transformation.

Improve this page