Subject: How lenient should a FITS reader be?

From: larryh at teleport.com (Larry Hutchinson)
Date: 24 Feb 1996 15:48:11 -0800

The fits user's guide (3.1) says that a string value has a ' in column 11.
However, in testing a FITS reader I am writing for Igor Pro 3.0, I have found a
file that has certain strings starting in column 12. 

The file in question was obtained from the ncsa fits web site and has the name
95.ML.01.01. (A VLA image of Mercury.) 

Should the reader try to accommodate screwups or is this a rare bad file?  

Anything else I sould be aware of?

-Larry Hutchinson
-WaveMetrics (creator of Igor Pro)
Voice: (503)-620-3001                   FAX:          (503)-620-6754
WWW site: http://www.wavemetrics.com/   Tech support: support at wavemetrics.com
FTP site: ftp://d31rz0.stanford.edu/    Information:  info at wavemetrics.com

P.S. Igor Pro is a scientific graphing and data analysis program currently
available only on the Macintosh. It's kinda like matlab or IDL but with an
actual user interface. 
-- 
larryh at teleport.com  Public Access User --- Not affiliated with TECHbooks
Public Access UNIX and Internet at (503) 220-1016 (2400-14400, N81)

---

From: William Pence <pence at tetra.gsfc.nasa.gov>
Date: Wed, 28 Feb 1996 17:17:39 -0500

> Anything else I sould be aware of?

There was a similar thread of messages on this topic in this news group
last December.  Those format rules you refer to only strictly apply to the
'required' FITS keywords.  It is recommended that other FITS keywords
also follow these format rules, but in fact any format that is
consistent with list-directed read operations in Fortran-77 is
allowed.   Thus, for example, all of the following keywords are legal:

STRING1 = 'DOG     '           / It's an animal
STRING2 =     'DOG    ' / It's an animal
STRING3 =     'DOG   '       It's an animal
STRING4 = 'DOG'It's an animal

INTEGER1=                 -273 / absolute zero
INTEGER2= -273     / absolute zero
INTEGER3=    -273 absolute zero

LOGICAL1=                    T / a true value
LOGICAL2= T /a true value
LOGICAL3=   T a true value

FLOAT1  =       12345.67890123 / 10 times greater than expected
FLOAT2  = 1.234567890123D+04            /      10 times greater than expected
FLOAT3  = 1234.567890123       10 times greater than expected

Bill Pence
HEASARC, NASA/GSFC