A question about integer valued header keywords
Barry M. Schlesinger
bschlesinger at nssdca.gsfc.nasa.gov
Tue Sep 24 09:35:00 EDT 1996
In article <slrn545kj5.5b8.davis at aluche.mit.edu>, davis at space.mit.edu writes...
> What is the precision of an integer in the header? I have not seen
>this question addressed anywhere in the fits documentation. I am
>concerned because the C Fitsio library defines the function `ffpkyj'
>which is prototyped
>
>int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
>
>The problem with this is that `long' is system dependent:
>... I could easily create a fits file on a 64 bit system that
>cannot be correctly parsed on a 32 bit system.
>--
An integer keyword value in the header is the ASCII representation of
an integer, using hexadecimal characters 30-39. Conversion to an
integer type for processing is a matter for software, and details of
the process are not specified. To read the FITS file properly, any
conversion of integer keyword values in a file to integer form must
contain enough bits to express the integers in that file. The use of
a C long type to contain the value of a keyword is a FITSIO design
decision and not specified by the rules of FITS.
Barry Schlesinger
FITS Support Office
GSFC/ADF
More information about the fitsbits
mailing list