64-bit integers in FITS

Tim Pearson tjp at astro.caltech.edu
Tue Jul 14 00:34:30 EDT 1998


Like William Pence, "I basically have an open mind about the
suggestion to support 64-bit integers in FITS files."

But I would like to remind people that the reason for doing so should
not be because 64-bit integers are convenient to use on some computer
systems, but because there is a need to interchange data that cannot
be represented in any of the current data types (BITPIX=8, 16, 32,
-32, or -64). I can't think of any astronomical data that require such
precision, but perhaps that just reflects the poverty of my
imagination.

If we do add BITPIX=64, perhaps we should also consider intermediate
types like BITPIX=40, 48, etc. which could also be accommodated in the
standard FITS structure and which would save space in the file when
full 64-bit precision is not required.

I am surprised that many people appear to think that FITS is designed
for interchanging computer bit patterns. It is not: it is for
interchanging images (and now tabular data), using as few different
conventions as possible.

This misunderstanding perhaps explains why someone might think that
"BSCALE = 2.0" means something different from "BSCALE = 2". BSCALE
specifies a mathematical operation to be performed on the data array
to construct the image pixel values; how it is done, and with what
precision, is up to the reader. There is certainly no implication that
32-bit (say) floating-point arithmetic should be used if that might
lose precision.

My interpretation of the NOST draft standard (Sec. 5.2.4) is that both
"BSCALE = 2" and "BSCALE = 2.0" are allowed, even though BSCALE is
specified to have a "floating point" value (5.4.2.5). They should be
interpreted identically.


Tim Pearson
Astronomy Dept, California Institute of Technology






More information about the fitsbits mailing list