[fitsbits] ASCII tables, TFORM and recommended practice

William Pence pence at tetra.gsfc.nasa.gov
Thu Apr 24 15:38:55 EDT 2003


Tom McGlynn wrote:
> 
> My feeling is that since the actual decimal in the
> string overrides the one specified in the TFORM, it is the responsibility
> of the display software to look at what is actually there but some does
> not.  

The practical difficulty of this suggestion is that the interface software
(CFITSIO for example) that reads the column of numbers in the ASCII table
may only return an array of IEEE format floating point numbers to the
application program, without any indication of how many decimal places were
actually expressed in each cell of the ASCII table.  It may put a
considerable burden on the display program to reproduce exactly the
character strings that are in the FITS ASCII table, especially if each row
has a different precision.  My feeling is that the display program should
first look for a TDISPn keyword to determine the display format, and if that
keyword does not exist then use the TFORMn format.  While the TDISPn keyword
was invented for use with Binary tables, there is nothing to exclude it from
use in ASCII tables as a way of suggesting the recommended display format.
Display programs are of course free to ignore the TDISPn keyword, however.

I think the argument for using TFORMn = 'Fnn.0' just to try to protect users
from incorrectly modifying the table is rather weak.  The burden should be
on the user to verify that any modifications are correct.

Bill Pence
-- 
____________________________________________________________________
Dr. William Pence                          William.D.Pence at nasa.gov
NASA/GSFC Code 662         HEASARC         +1-301-286-4599 (voice)     
Greenbelt MD 20771                         +1-301-286-1684 (fax)




More information about the fitsbits mailing list