[fitsbits] reopening of Public Comment Period on the CONTINUE convention

Demitri Muna demitri.muna at gmail.com
Thu Mar 10 13:57:31 EST 2016


Hi Dick,

On Mar 10, 2016, at 11:03 AM, Dick Shaw <shaw at noao.edu> wrote:

> I can see you feel strongly about the positioning of the ampersand character in the context of CONTINUE.

It's my favorite typographical character. (I also have strong feelings about the Oxford comma and the grocer's apostrophe.)

>> Can you provide an example where this would be a problem? You would never have this, for example:
>> STRKEY  = 'string' & / comment
>> This seems to be the edge case, where again the ampersand is not between the '/' and the comment, which is still not a problem:
> 
> Unfortunately, this is certainly not an edge case. A quick browse through many FITS headers shows that a keyword = string value, followed by a comment, happens all. the. time. Allowing the syntax you suggest, in this context, would amount to a pretty big change.

The line above was intended to be one that is invalid. (See below for alternate.)

>> I think this is a very important point. There has been a lot of discussion about file formats and pretty wide dissatisfaction with FITS. There's no question it's showing its age. I think it would be one thing if there was a commitment to properly addressing the real concerns with a proper FITS v2.0 versus incremental patching. The past should guide the future, not constrain it.
> 
> I have some sympathy for that point. But we do have to live with the prior history of FITS, warts and all. Therefore it's important to avoid introducing changes that either invalidate current FITS files or are highly disruptive of existing FITS software, unless there is a highly compelling reason or unless the proposed change can be ignored by an extant FITS reader without undue harm. This statement would hold more-or-less true whether we are discussing FITS, or any alternative standard once it has been around for awhile.

I fully appreciate not creating disruption, and of course we don't want to invalidate existing files. However, somewhere we have to draw the line. It doesn't make sense to constrain advances or improvements if doing so will break a FITS reader that has been abandoned a decade (or much more) ago.

I know the "once FITS, always FITS" mantra. I've always seen this as having two interpretations:

1) Any FITS file that conforms to the FITS standard at any time must be readable.
2) Any software that reads a FITS file must be able to read any conforming FITS file, past or future.

Absolutely no disagreement on point 1, particularly as one who is writing a new FITS viewer. Point 2 is a path locked towards obsolescence. Software can (and should) be updated.

So while it appears that I feel strongly about ampersand characters, this argument is the real motivator.

> I guess the question is: can your idea be expressed in the proposed change to the Standard in a non-disruptive way?

Off the top of my head? The continuation string would be "/&" and only be allowed at the end of the line.

STRKEY  = 'here the ampersand is interpreted as a comment by older software' /&
CONTINUE= ' but is actually continued here' /&
CONTINUE= ' and ends' / with this comment

This is an error:

STRKEY = 'this string is not continued' /&
KEYWORD1= 42

Any non-space following the "/&" is also invalid as a continuation character:

STRKEY  = 'this is not a continuation' /& one for all
CONTINUE= 'invalid file for the characters after the continuation' / comment

but valid otherwise:

STRKEY  = 'this is not a continuation' /& one for all
STR2    = 'no problems here'

Section 4.1.2.3 says: "A space between the value and the slash is strongly recommended", so it's not *required*. This is another hint to the reader that "/&" is not a comment.

I would still argue that the comment should not span indefinite multiple lines as well, leaving the maximum comment:

STRKEY  = 'string to continue here' /&
CONTINUE= '' / longest possible comment here ...

And given the above, I would dispense with the "CONTINUE" keyword as it's redundant, instead opting to use the same keyword:

STRKEY  = 'here the ampersand is interpreted as a comment by older software' /&
STRKEY  = ' but is actually continued here' /&
STRKEY  = ' and ends' / with this comment

This would cause no issue with existing FITS readers (that I can see), and is actually more in line with how things like HISTORY is used. This would define two long values with the same keyword:

STRKEY  = 'this is a long string ' /&
STRKEY  = 'continued on the next line, ending here' / optional comment
STRKEY  = 'this is a second value' / with comment

Cheers,
Demitri

_________________________________________
Demitri Muna
http://muna.com

Department of Astronomy
Der Ohio State University

My Projects:
http://nightlightapp.io
http://trillianverse.org
http://scicoder.org


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20160310/a8466eec/attachment.html>


More information about the fitsbits mailing list