[fitsbits] FITS 'P' descriptors: signed or unsigned?

Clive Page cgp at star.le.ac.uk
Thu Jun 16 12:02:21 EDT 2005


On Thu, 16 Jun 2005, LC's No-Spam Newsreading account wrote:

> I suggest the issue is voted together with the Q descriptors, since it
> requires a change to the recently approved standard, and there is no
> sense in having P signed and Q unsigned.

I agree that it makes no sense, and also lacks elegance and consistency,
but these qualities have never played much part in the design of FITS, and
I wonder if it isn't a bit late to start now :-)

>  - the other one is that unsigned may not be supported by all
>    programming languages (I'm specifically thinking of Fortran), which

Well I'm a dyed-in-the-wool Fortran programmer, but I don't think this
affects the argument at all.  Fortran code is likely to depend upon a
library such as FITSIO to do its dirty work, and even if people insist on
writing Fortran to read FITS files directly, there are fairly easy
solutions to this problem.

My own interest in the 64-bit topic was sparked by finding FITS binary
tables that were likely to exceed 2 GB in size, and with the possibility
that they might have tables of over 2 billion rows.  This would mean
NAXIS2 in the header would have an integer constant above the limit for a
32-bit integer.  As far as I can see there is nothing in the FITS Standard
to affect this, it's only specific implementations that might be lacking.

The only thing that's releant here is that it might be a good idea for the
revised Standard to include a note pointing out that integers values in
headers might be larger than a 32-bit integer can handle.

-- 
Clive Page
Dept of Physics & Astronomy,
University of Leicester,
Leicester, LE1 7RH,  U.K.



More information about the fitsbits mailing list