AstroPy: Announcing PyFITS v0.1

Paul Barrett barrett at
Fri Apr 2 14:03:09 CST 1999

This is to announce Version 0.1 of PyFITS.  You can download a gzipped
tarfile of these modules from

Note that this is alpha software, so it is by no means complete or
bug-free, but should be such a state to be useful to those Pythoneers
interested in perusing and possibly reading and writing FITS files. 

The '' module imports a C-extension module named 'record', which
enables one to access binary data structures using array syntax, like the
NumPy module.  It differs from NumPy in that it converts from big- or
little-endian format to native machine format on the fly.  To import into
NumPy, use the record.tostring() and Numeric.fromstring methods. 

The source file for the record module is located in ./PyFITS/src.  You
will need to make a shared object file from the C source file to use it
(unless you are on Solaris, in which case you can use the one that already

To run a simple test of

> cd ./PyFITS/pythoncodes
> cp ../src/ .
> python

This will read and display about a half-dozen FITS file located in the
current directory.  Take a look at to see how to read your own
files.  Currently, can only read and write Primary and Binary
Table HDUs.  To learn more about the design of PyFITS, read the ADASS 8
paper by Barrett and Bridgman at

The record and fitsio modules will continue to be improved and updates
will hopefully be posted to the above URL on a weekly basis.  Your
comments, suggestions, and patchs are always welcome.


AstroPy mailing list  -  astropy at

More information about the AstroPy mailing list