[fitsbits] FITS vs. TIFF (or other image formats)

Steve Willner willner at cfa.harvard.edu
Tue Nov 20 16:19:18 EST 2001


In article <tvistej1dacldd at corp.supernews.com>,
 "Rick Armstrong" <careful at times.com> writes:
> I'm storing 8-bit unsigned chars, so the precision of FITS is probably
> super-overkill for my needs (w.r.t. precision).

BITPIX=8 is valid FITS, according to:
http://archive.stsci.edu/fits/fits_standard/node39.html#582

I think the questions you need to ask yourself are: 

1) Do you need the actual data value at every "pixel?"  (Or is an
approximation that preserves the human-viewed appearance of the image
good enough?)

2) Do you need a header giving detailed information about the data in
the file?

3) Do you need to transport the images to multiple computer systems
or preserve the images over time?

If the answer to at least one of the above questions is 'yes', FITS
is worth considering.

(Paul S.: FITS data are indeed binary.  Only the headers are ASCII.
The key point is that the byte order and bit order are specifically
defined.  On some types of machines, bits or bytes have to be
reversed to get them into the machine's internal format.  If you want
to email a FITS file, you may have to encode it with base64 or
uuencode or something similar.  Use the 'binary' mode if transferring
by ftp.)

-- 
Steve Willner            Phone 617-495-7123     swillner at cfa.harvard.edu
Cambridge, MA 02138 USA                 
(Please email your reply if you want to be sure I see it; include a
valid Reply-To address to receive an acknowledgement.  Commercial
email may be sent to your ISP.)



More information about the fitsbits mailing list