Subject: | stripping of leading blanks and slashes from comment like cards |
When A::F::H parses FITS headers, leading blanks and /'s are explicitly stripped from comment-like cards. In my experience leading spaces are usually significant, as they are often used to improve readability of the comments. In addition, removal of leading slashes may lead to loss of information. In any case, removing the leading characters means that one can't write out exactly the same header as before, which is sometimes necessary to ensure that header checksums aren't recalculcated. Here's a real world example. The salient bits of the header:
HISTORY data file:
HISTORY /proj/axaf/foo.fits
Here's what happens to the comment for the second HISTORY line:
DB<1> print (($hdr->itembyname('HISTORY'))[1]->comment)
proj/axaf/foo.fits
Since the code explicitly removes those characters, I'm sure that someone out there needs this behavior. Perhaps an option? I think that the default behavior should be to retain all of the original characters (excluding trailing blanks, perhaps, as they will be added in automatically anyway).
Diab