[fitsbits] Blank strings in FITS keywords.

Maren Purves m.purves at jach.hawaii.edu
Tue Mar 1 13:27:07 EST 2005


William Thompson wrote:
> Thomas McGlynn wrote:
> 
>> The problem is that since the first FITS paper (and still in the 
>> standard),
>> the fixed format is recommended for header cards.  In the fixed format 
>> there
>> must be at least 8 characters in a character value.  Reading that paper
>> if I wished to specify a string with the value of '' in the fixed format
>> I believe I would have written it as
>>    ABCDEFGH= '      '
>> and felt that I was following the recommendations of the standard.
> 
> 
> I second this statement.  In fact, the FITS-writing software that I use 
> enforces the fixed format, so that it would be impossible to write a 
> null string separate from a blank string, e.g.

yes, but ...

I think that's an entirely different question. Some of our older
data reduction software takes offense to character strings containing
nulls, but I consider that beside the point here as well.

I thought the question was whether '' _is_ a null string or a blank
string and I also think that '' should be a null string, independent
of whether we (can) write it or read it, not blank.
We have one case where we would have liked to write a null string,
found that we couldn't do that, and settled on 'none    ' (probably
for the better of everybody who reads our data).

> IDL> fxhmake,h
> IDL> fxaddpar,h,'abcdefg',''
> IDL> hprint,h
> SIMPLE  =                    T /Written by IDL:  Tue Mar  1 11:10:43 2005
> BITPIX  =                    8 /
> NAXIS   =                    0 /
> ABCDEFG = '        '           /
> END

Aloha,

Maren Purves, UKIRT.



More information about the fitsbits mailing list