AstroPy: Announcing PyFITS v0.1

Paul Barrett barrett at stsci.edu
Fri Apr 2 15:03:09 EST 1999


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

ftp://cossc.gsfc.nasa.gov/pub/outgoing/barrett/PyFITS/PyFITS_19990402.tgz


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 'fitsio.py' 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
exists). 

To run a simple test of fitsio.py:

> cd ./PyFITS/pythoncodes
> cp ../src/recordmodule.so .
> python fitsio.py

This will read and display about a half-dozen FITS file located in the
current directory.  Take a look at fitsio.py to see how to read your own
files.  Currently, fitsio.py 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

http://www.dpt.stsci.edu/dpt_papers/opus_bib.html

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.

Enjoy,
Paul


__________________________________________________
AstroPy mailing list  -  astropy at athena.gsfc.nasa.gov
http://lheawww.gsfc.nasa.gov/~bridgman/AstroPy/



More information about the AstroPy mailing list