Important notice regarding the future of PyFITS
All of the functionality of PyFITS is now available in Astropy as the
astropy.io.fits package, which is now publicly available.
Although we will continue to release PyFITS separately in the short term, including any critical bug fixes, we will eventually stop releasing new versions of PyFITS as a stand-alone product. The exact timing of when we will discontinue new
PyFITS releases is not yet settled, but users should not expect PyFITS releases to extend much past early 2014. Users of PyFITS should plan to make suitable changes to support the transition to Astropy on such a timescale. For the vast majority
of users this transition is mainly a matter of changing the import statements in their code--all APIs are otherwise identical to PyFITS. STScI will continue to provide support for questions related to PyFITS and to the new
astropy.io.fits package in Astropy.
PyFITS provides an interface to FITS formatted files in the Python scripting language and PyRAF, the Python-based interface to IRAF. It is useful both for interactive data analysis and for writing analysis scripts in Python using FITS files as either input or output. PyFITS is a development project of the Science Software Branch at the Space Telescope Science Institute.
PyFITS and all necessary modules are included with the stsci_python distribution and associated updates to it (though what is included there may not be the very latest version). PyFITS does not require PyRAF however. It may be used independently so long as numpy is installed.
The manual provides a tutorial on how to use PyFITS with FITS images and FITS tables, along with an extensive description of all the methods (currently) available for working with FITS files. This manual, however, is only a DRAFT document and is very much a work-in-progress. An HTML version of the manual, including API documentation, is also available.
The current version of PyFITS is v3.3.0 (July 17 2014).
PyFITS 2.3.1 and later is distributed under a BSD license. Unfortunately, PyFITS version 2.0 (January 30 2009) through version 2.3 (May 11 2010) contained some code in the Compressed Image HDU extension module that was covered under a GNU General Public License. Prior to PyFITS version 2.0 and beginning again with PyFITS version 2.3.1 (June 3 2010) PyFITS is covered under a BSD license.