I have a script that worked with marx 5.0, but that now fails with 5.1.
The script is (probably) dying at a stage where it is running marx2fits (the version 5.1.0-0 version on 64bit linux here), with the message:
ERROR: String is too long for keyword ASOLFILE
WARNING: Either the header or the data portion of the file was not ended. I am assuming this is the data portion and filling it with 0.
It seems that I need to sanitize filenames that are longer than allowed for values in the fits header. In CIAO that does not happen, because the data reduction scripts produce filenames that are short enough automatically, but specifically for ASOLFILE users may input their own files.
I don't think there is an easy way to encode a value that is too long in the header, so I will probably do the following implementation:
If the filename is too long, emit a warning.
write the first few characters and append "..." to indicate that it's incomplete. (The fits standard says that he string can go up to column 80, but also that "reading the data values shall not require more than decoding the first 8 characters". I will use the limit that jdfits uses for this purpose. This is a rare case and fits is limited.)
From a user report:
I have a script that worked with marx 5.0, but that now fails with 5.1. The script is (probably) dying at a stage where it is running marx2fits (the version 5.1.0-0 version on 64bit linux here), with the message:
ERROR: String is too long for keyword ASOLFILE WARNING: Either the header or the data portion of the file was not ended. I am assuming this is the data portion and filling it with 0.
It seems that I need to sanitize filenames that are longer than allowed for values in the fits header. In CIAO that does not happen, because the data reduction scripts produce filenames that are short enough automatically, but specifically for ASOLFILE users may input their own files.
I don't think there is an easy way to encode a value that is too long in the header, so I will probably do the following implementation: