Subject: are negative bitpix values legal??

From: bruce at head-cfa.harvard.edu (Bruce Sams)
Date: 12 Feb 93 07:44:08 GMT

Hello there,

I'm writing a very simple FITS i/o facility for our data system here
at the Max Planck Institute in Munich, and I've come across a
question about whether it is legal to have negative values for BITPIX
in order to indicate that the dta is floating point rather than integer.
Can someone please tell me if this is legal?  I have not seen it
before, but the SAOIMAGE fits reader seems to use it.

Many thanks,

Bruce Sams

---

From: oday at lobster.gsfc.nasa.gov (Orin Day)
Date: Fri, 12 Feb 1993 20:31:16 GMT

In article <1993Feb12.074408.17376 at cfa160.harvard.edu>  
bruce at head-cfa.harvard.edu (Bruce Sams) writes:

> Can someone please tell me if this is legal? 

Quoting directly the 3.0 NOST FITS User's Guide, p.16:

****************************************************************
2. BITPIX (integer) describes how an array value is represented:

  8 -->  ASCII or 8-bit unsigned integers
 16 -->  16 bit, twos complement signed integers
 32 -->  32 bit, twos complement signed integers
-32 -->  IEEE 32-bit floating point values
-64 -->  IEEE 64-bit floating point values
No other values for BITPIX are valid
****************************************************************

I believe the current standards document can be obtained via
anonymous FTP from nssdca.gsfc.nasa.gov.

OD

--
************* "How about a little fire, Scarecrow?" **************
Orin Day, Code 664.1                    oday at lobster.gsfc.nasa.gov
Hughes STX/NASA       GSFC Laboratory for High Energy Astrophysics
*******"Think that this is NASA's opinion?   NO, NO, NO!!!" ******

---

From: bschlesinger at nssdca.gsfc.nasa.gov (Barry Schlesinger)
Date: Fri, 12 Feb 1993 21:17:00 GMT

In article <1993Feb12.074408.17376 at cfa160.harvard.edu>, bruce at head-cfa.harvard.edu (Bruce Sams) writes...

>before, but the SAOIMAGE fits reader seems to use it.

BITPIX = -32 means that the data are in single precision (32-bit) IEEE
floating point. 

BITPIX = -64 means that the data following are in double precision 
(64-bit) IEEE floating point.

No other negative values of BITPIX are permitted.

				Barry Schlesinger
				NSSDC/NOST
				FITS Support Office