Open bensetterholm opened 4 years ago
Wow, thanks for the great reproducible example!
My understanding is that the problem is that the comment extends over multiple keywords. Libcfitsio.fits_write_comment
calls ffpcom
from CFITSIO, which, according to the documentation,
If the comment string is too long to fit on a single keyword (72 chars) then it will automatically be continued on multiple CONTINUE keywords.
When fits_write_header
iterates over all keywords, it writes the multi-keyword comment multiple lines.
@kbarbary any idea how to best deal with this?
When I write to a new FITS file using a
FITSHeader
object extracted from a previously opened FITS file, the comment blockis duplicated. For example:
I also note that the string representation of the FITSHeader object cuts off the final "y" in the first COMMENT card.