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

William Pence pence at tetra.gsfc.nasa.gov
Tue Nov 20 10:51:14 EST 2001


> Actually, I'd think FITS is exactly what you want: You can put
> coordinate and unit information in the header as ASCII text that anyone
> can read, and you can store your 8-bit data as a binary 8-bit image
> with lossless compression. CFITSIO does the one weird bit transparently
> (i.e., FITS data are signed, but allow for an offset and scale, which
> CFITSIO applies transparently).

Actually, the native FITS 8-bit data type is defined as an unsigned byte; 
the offset then can be used to store signed bytes in FITS.  The native 16
and 32-bit integer data types are both signed, and the offset can be used in
these cases to store unsigned integers.

And on another point:

> > Only the headers are ASCII, the data records are typically binary values
> 
> Really?  You're sure it's not Base64 encoded?

Yes, the data is not Base64 encoded. There are 5 native FITS image data
types:
  
 -  8-bit unsigned binary integers, (0 to 255)
 - 16-bit twos-complement signed binary integers (-32768 to +32767)
 - 32-bit twos-complement signed binary integers 
                   (-2147483648 to 2147483647)
 - 32-bit single precision floating point (ANSI/IEEE-754 standard)
 - 64-bit double precision floating point (ANSI/IEEE-754 standard)

In addition, FITS binary tables support columns containing logical, bit,
character string, and single and double precision complex data types.

-Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                          pence at tetra.gsfc.nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)



More information about the fitsbits mailing list