fitsio
fitsio copied to clipboard
Handling of COMMENT, HISTORY, END cards differs wrt cfitsio
The returned value of Header.Keys()
does not include cards of type END
, COMMENT
, HISTORY
:
https://github.com/astrogo/fitsio/blob/0221d1a54f8c95dcfc14c3234c9091e3287ef411/header.go#L323
I understand that there is a method for retrieving the comments and history cards of a FITS header, I would suggest that for compatibility with cfitsio
, those cards should be also be returned by Header.Keys()
.
In addition, it seems that astrogo/cfitsio
assumes that in a given HDU there is only one card of type HISTORY
or COMMENT
. This is not the case with cfitsio
.
In case it matters, for my tests I'm using cfitsio v3.370
.
An example of a file with several COMMENT
cards in the same HDU can be found at:
ftp://legacy.gsfc.nasa.gov/fits_info/sample_files/images/rosat_pspc_rdf2_3_bk1.fits