[fitsbits] Possible bug in CFITSIO
THIERRY FORVEILLE
thierry.forveille at univ-grenoble-alpes.fr
Fri Feb 28 07:08:26 EST 2020
> So for clarity:
>
>
>
> Are you saying that if the headers of a 16 bit FITS file say:
>
>
>
> SIMPLE = T / file does conform to FITS standard
>
> BITPIX = 16 / number of bits per data pixel
>
> BZERO = 32768 / offset data range to that of unsigned short
>
> BSCALE = 1 / default scaling factor
>
>
>
> that I should ignore the fact the BITPIX is telling me to use signed short,
>
BITPIX is not telling you what to use in your code, just what's stored in the
file. _That_ is signed shorts, but what you convert it to is totally up to you.
I'd use floats (because I'll promptly do things like averaging multiple images,
and those of course step out of the integer space), but you are welcome to use
unsigned shorts if you like, or signed longs, or even complex doubles for the
matter.
More information about the fitsbits
mailing list