[fitsbits] INF/NAN as header values?

Lucio Chiappetti lucio at lambrate.inaf.it
Mon Jun 10 05:23:38 EDT 2013


On Sun, 9 Jun 2013, Mark Calabretta wrote:

> Section 4.4.2.5 of the FITS standard says:
>
>  DATAMAX Keyword  The value field shall always contain a floating-point
>  number, regardless of the value of BITPIX.  ...

Well, thanks Mark ... but you aren't quoting the very last phrase of the 
sentence which says "exclusive of any IEEE special values", which should 
even strengthen your argument !

So I interpret this as the fact that the software shall COMPUTE the max 
and min of the data array NEGLECTING the pixels containing a "null" value 
(which for BITPIX -32 -64 should be a NaN (or Inf too ?)). Actually it 
does not say anything about null pixels in BITPIX 8/16/32/64 i.e. those 
with BLANK (kwd) value.

But if seems good practice that "null" values are excluded from the 
computation of min/max.

Actually I have a vague recall that IEEE NaN's (or mysql null's ? or both? 
despite different implementation) have the property that they are both 
equal and unequal to themselves. So they aren't very suited for a max or 
min too ...

if DATAMIN and DATAMAX are the min/max of the valid values, the only case 
they can be undefined is if ALL the pixels in the data array are invalid.
A case which should be trapped by s/w, but surely a FITS file like that is 
not very useful !




More information about the fitsbits mailing list