[iaufwg] Appendix A, END keyword

William Pence William.Pence at nasa.gov
Thu Mar 20 17:42:23 EDT 2008


Andreas Wicenec wrote:
> On 18.03.2008, at 22:50, William Pence wrote:
>> The formal syntax in Appendix A does actually cover the case of the 
>> END keyword record.  Formally, the END keyword is a 
>> 'FITS_commentary_keyword_record', and more specifically, it is the 
>> case where the non-blank keyword field is followed by 
>> 'anychar_but_equal'. In other words, since the END keyword record does 
>> not have an equal sign in byte 9, it is considered one of the class of 
>> commentary keywords.
[snip]

> I actually got confused by the page break in the middle of the 
> definition of the FITS commentary keyword record  definition.
> I have nothing against having it as a commentary keyword, but still 
> think we could add it just in the same way as the COMMENT and HISTORY,
> i.e.
> 
> FITS commentary keyword record :=
> COMMENT keyword [ascii text char...] |
> HISTORY keyword [ascii text char...] |
> END keyword [ascii text char...] |
> BLANKFIELD keyword [ascii text char...] |
> keyword field anychar but equal [ascii text char...] |
> keyword field : '=' anychar but space [ascii text char...]
> 
> and then further down define the END keyword as
> 
> END keyword :=
> 'E''N''D' space space space space space
> 
> This is still not quite correct, because it does not constraint the rest 
> of the line to be only spaces, but it is already better than leaving it 
> just implicitly defined.

There is a difference:

The COMMENT, HISTORY, and BLANKFIELD keywords must be explicitly 
enumerated  in this syntax because these keyword are allowed to have a 
"= " in bytes 9-10 of the keyword record, but if they do, then they 
would still be classified as a FITS commentary keyword record.

The END keyword on the other hand is prohibited from having an '= ' in 
bytes 9-10, so it is not necessary to make it as a special case in this 
grammar.

It is beyond the scope of this formal syntax to define the constraints 
on individual keywords; thus it does not indicate that the END keyword 
record must contain only space.  But by the same token this grammar also 
doesn't define the constraints on the remainder of the keyword record 
for any other keyword, such as the data types of any of the mandatory 
keywords, or any limits on the range of values of any keyword.  One must 
read the text in the Standard itself to get this detailed information.

Bill
-- 
____________________________________________________________________
Dr. William Pence                       William.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 iaufwg mailing list