[fitsbits] Blank strings in FITS keywords.

Maren Purves m.purves at jach.hawaii.edu
Wed Mar 2 19:34:23 EST 2005


LC's No-Spam Newsreading account wrote:
> On Tue, 1 Mar 2005, Maren Purves wrote:
> 
>>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.
> 
> Personally I've always been disturbed by the distinction between a null
> string, a single blank character, an entirely blank string, or a
> non-existing value, which I consider a useless nuisance.
> 
> I've always written my s/w to deal with such cases in equivalent ways,
> making the distinction irrelevant. That applies both to reading FITS
> header keywords, or to getting the value of environment variables, or
> whatever else.

as a data acquisition (rather than data reduction) person I find it 
important to make the distinction as it is likely to indicate a problem.
The astronomer shouldn't see these, but I find them useful for trouble
shooting.

> This will return to me the "value" of the object (keyword, environment
> variable) named "name", but, if it does not exist, is not set, is null
> or entirely blank, will return the "defaultvalue" I supply as "value".
> 
> This can be a true default useful in the specific situation, or some
> placeholder like 'undefined' or 'notexisting'.
> 
> An error code "error" might be useful to flag (as warning) the fact the
> default value was substituded to the returned value, as well as other
> conditions (e.g. a string was truncated, a type mismatch etc.)

yes, but in a way that makes the same distinction and I don't really 
want to deal with making this distinction human readable on the data
acquisition end of things.


Maren
(sorry if you get this twice the news server on our end refused
my first attempt so I took the copy to the newsgroup off)



More information about the fitsbits mailing list