Unsigned integer support in NOST 100-1.2
Thierry Forveille
Thierry.Forveille at obs.ujf-grenoble.fr
Thu Jul 16 03:56:08 EDT 1998
William Pence writes:
> The FITS standard allows optional characters following the datatype
> character in the TFORMn keyword, so one could adopt a convention
> something like:
>
> TFORM1 = '1IU' / datatype is unsigned 16-bit integer
> TZERO1 = 32768
>
> or
>
> TFORM1 = '1I(unsigned)' / datatype is unsigned 16-bit integer
> TZERO1 = 32768
>
> This doesn't require any change to the FITS standard, and the TZEROn
> keyword is still required, but at least it would be clearer to people
> reading the header that this is an unsigned integer column.
>
Really I don't see the point of keeping track of the unsigned origin of
a datum. As mentioned earlier in this discussion, the purpose of FITS is
to transfer numerical information, not bit patterns. Whether a column
originates from unsigned IEEE 16 bits integers or 30 bits one from a CDC
mainframe is irrelevant for the receiving program, as long as it fits
in its specified format. Most modern image processing systems will
convert it to 32 bits integers anyway (if not to floats) for the sake
of efficiency.
Actually, all people I have heard arguing for an unsigned 16 bit format
(nobody seems to demand 32 bits unsigneds) really want to use it to store
floating point data affected by quantisation noise ;)
More information about the fitsbits
mailing list