Subject: reading IRAS FITS files

From: alex at cfi.ucsb.edu (Alex Wuensche)
Date: 24 Mar 93 21:33:43 GMT

Hi.

Does anybody around have a piece of code to read a FITS file block, and 
make it understandable? I mean, I have trouble in translating the character 
real (or integer) numbers. I've been trying to use the FITSIO library 
routines, but haven't found any that worked the way I wanted (maybe I 
don't know enough about FITS files yet, but they are not very well 
documented, anyway...). I'd prefer suggestions in Fortran, but any piece of 
information or code is welcome. Please, send me a personal mail, and, if I 
feel there are enough answers (i.e., more than 2 :-) ) and/or interest in 
the subject, I'll post a summary.

Thanks a lot,

Alex

---

From: pence at tetra.gsfc.nasa.gov (William Pence)
Date: Thu, 25 Mar 93 11:32:51 EST

On 24 March 93 Alex Wuensche wrote:

>real (or integer) numbers.

Strictly speaking, it is impossible to decode an arbitrary FITS file
2880-byte block because the information needed to decode it may be
contained in a previous block.  So I think you are taking the
wrong approach if you are trying to read a FITS file on a block
by block basis.  Instead, it is more useful to think of a FITS file
as a continuous stream of bytes which make up a series of header
keyword records followed by an optional set of data.  This is
view that the FITSIO interface provides which contains subroutines
to read the header records or read the attached data records.
This insulates the application programmer from having to worry about
the internal blocked structure of the FITS files, which is 
irrelevant for most applications.

-Bill Pence