Astro-Py list

Andrew Williams andrew at
Thu Feb 24 03:25:38 CST 2000

This list has been quiet since I joined - is there actually anyone out

I'm at Perth Observatory in Western Australia, using Python for data
reduction scripts, and to control an Apogee AP7 camera, through pipes
to a low-level driver ('Ariel') written by staff at Ohio State
University. The only code likely to be useful elsewhere is a FITS file
class that reads and parses header cards into a dictionary, so you can
do stuff like:

 import fits


 print 'Exptime=',et,' and comment was:',f.comments['EXPTIME']
 print 'All history cards for ',f.filename,':'
 print f.comments['HISTORY']

Not fancy - no error checking yet to see if the file actually _is_ in
FITS format, for example - but it's only 50 lines of python. So far it
only handles 'h' mode, to parse headers and leave the file closed. I
was planning to add 'r' and 'w' as for normal file classes when I need
to actually get at the data. I also don't want to spend too much time
duplicating something that's already been written.

The code is at:

Andrew Williams

Dr Andrew Williams                              andrew at
Perth Observatory,                            andrew at
Walnut rd, Bickley, Western Australia.    andrewW at

More information about the AstroPy mailing list