[fitsbits] Repeated header keywords (was: Re: Proposed Changes to the FITS Standard)

Dick Shaw shaw at noao.edu
Sat Aug 18 20:38:54 EDT 2007


Jonathan is quite correct that when duplicated keywords appear with different 
values, it is not in general possible to know which value was intended.

On Fri, 17 Aug 2007, Jonathan McDowell wrote:
> I agree with Thierry that there are many files which have repeated keywords,
> but I agree with another poster that there are existing implementations which
> assume it's the first instance, not the last instance, which prevails.
> So I think we should just strongly deprecate (not ban, and not impose
> an interpretation).

But it is not that simple. How is a user or an application supposed to 
interpret the corrupted metadata? As Bill points out, depending upon which 
keyword is affected the problem may radically alter the scientific 
interpretation or, worse, render the object uninterpretable. I think we do not 
want to "deprecate" bad usage that was never explicitly permitted in the 
Standard, even if it was never forbidden either. The horse has long since 
bolted from the barn, and there is little to do but provide some guidance in 
the standard.

Bill Pence wrote:
>Stepping back a little, I think the seriousness of this problem depends 
>on what keyword is duplicated. If it is just some observatory-specific 
>keyword that does not directly affect the scientific results, then it 
>does not matter very much, and data providers need not worry about it. 
>But if a critical WCS keyword, or exposure time keyword is duplicated in 
>the file with different values, then surely the data providers need to 
>take responsibility and fix the problem.

One approach would be to say that headers _should not_ contain repeated 
keywords, and if a repeat does occur then the value is not defined (unless the 
values are identical). Ideally, this could have a few desired effects: it 
would encourage authors of FITS verifiers to flag instances of repeated 
keywords (though I suspect they do already), it would encourage FITS writers 
to pay attention to this problem, and it would encourage application 
developers to be refrain from silently adopting the first, last, or whatever 
instance of a keyword value without telling the user.



More information about the fitsbits mailing list