[fitsbits] Blank strings in FITS keywords.
Peter Bunclark
psb at ast.cam.ac.uk
Tue Mar 1 05:16:51 EST 2005
Tom McGlynn wrote:
> Here's a little FITS lawyer nit.
>
> Section 5.2.1 of the FITS standards document
> notes that
>
> KEYWORD1= ''
>
> is distinct from
>
> KEYWORD1= ' '
>
> However I am unclear as to whether either of these are
> distinct from
>
> KEYWORD1= ' '
>
> (where there are at least 8 blanks between the quotes).
>
> The first two examples clearly use the free format for
> the headers, but the third example could be in the fixed format.
> Since a fixed format line cannot have fewer than 8 characters
> in a character string header value, a sequence of 8 blanks is the only
> way to specify these strings in the format that that standard
> recommends people use.
>
> Since one is allowed to intermix free and fixed format
> cards in the header there is no context that can tell you which format
> the
> card is in.
>
> So it looks like
>
> Example 1 EQV example 3
> Example 2 EQV example 3
> but
> Example 1 NOT EQV example 2.
>
> Is this true? If so I think this may be the only example
> where this is the case and seems a little inelegant to me. Probably
> too late to change
> but it might have been better to have the first two examples
> equivalent too.
>
> Not a big issue, but it actually has come up in practice!
> Regards,
> Tom McGlynn
Trailing blanks are not significant:
KEYWORD1= '' / null string
KEYWORD1= ' ' / value is a single blank
KEYWORD1= ' ' / value is a single blank
KEYWORD1= ' ' /value is a single
blank
Pete.
More information about the fitsbits
mailing list