-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
cube.output_first_header is missing comments for several keywords. One way to fix this is to update line 39 of fits.py. Instead of
header_dict = {
k: fits.Card(
k,
hdu.data[k][0]
if isinstance(hdu.data[k][0], str)
else np.nanmedian(hdu.data[k]),
c,
)
if (k in hdu.data.columns.names)
else fits.Card(k, hdr[k], c)
for k, c in zip(hdr.keys(), hdr.comments)
if (
(k not in delete_kwds)
and (not k.startswith("TTYPE") and (not k.startswith("TFORM")))
)
}
use this instead
header_dict = {
k: fits.Card(
k,
hdu.data[k][0]
if isinstance(hdu.data[k][0], str)
else np.nanmedian(hdu.data[k]),
c if c != "" else hdr[k],
)
if (k in hdu.data.columns.names)
else fits.Card(k, hdr[k], c)
for k, c in zip(hdr.keys(), hdr.comments)
if (
(k not in delete_kwds)
and (not k.startswith("TTYPE") and (not k.startswith("TFORM")))
)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels