This is a guest post by Adrian Price-Whelan (@adrianprw), an NSF graduate fellow at Columbia University. Adrian works on tidal streams and Galactic dynamics, is an open source enthusiast, Python developer, and plays bass for death ray architect. He is also an instructor in the SciCoder workshops and Python workshops at AAS meetings.
Astropy is a community-developed Python package intended to provide much of the core functionality and common tools needed for astronomy and astrophysics research (c.f., IRAF, idlastro). In order to provide demonstrations of the package and subpackage features and how they interact, we are announcing Astropy tutorials. These tutorials are aimed to be accessible by folks with little-to-no python experience and we hope they will be useful exercises for those just getting started with programming, Python, and/or the Astropy package. (The tutorials complement the Astropy documentation, which provides more detailed and complete information about the contents of the package along with short examples of code usage.)
The Astropy tutorials work through software tasks common in astronomical data manipulation and analysis. For example, the “Read and plot catalog information from a text file” tutorial demonstrates using astropy.io.ascii for reading and writing ASCII data, astropy.coordinates and astropy.units for converting RA (as a sexagesimal angle) to decimal degrees, and then uses matplotlib for making a color-magnitude diagram an all-sky projection of the source positions.
Several of the tutorials also demonstrate how to use matplotlib to make 2D images with different color maps, stretches, and colorbars.
So far, we’ve made five tutorials:
- Editing a FITS header
- Read and plot catalog information from a text file
- Using Astropy Quantities for astrophysical calculations
- Viewing and manipulating FITS images
- Viewing and manipulating data from FITS tables
We welcome feedback and improvements to these tutorials via the Astropy Tutorials repo on Github. If you find a typo or would like to clarify some text, please either create an issue or make the change yourself and then submit a pull request directly to the repository. Questions and/or comments about the tutorials are welcome on the astropy-dev mailing list.
If you are interested in contributing an IPython notebook as a tutorial, please check the README or contact the developer list. Also, if you have an idea for a tutorial or a tutorial request, please post to the developer list or leave a comment below. If you would like to contribute to this effort, but need some inspiration, check out the open issues. This is a collaborative effort and we are looking for contributions and ideas from users like you!
If you use Astropy directly—or as a dependency to another package—for your work, please remember to include the following acknowledgment at the end of papers:
This research made use of Astropy, a community-developed core Python package for Astronomy (Astropy Collaboration, 2013).
where “(Astropy Collaboration, 2013)” is the Astropy paper.