Fix meta data handling in table_to_fits_table
@@ -344,9 +344,9 @@ def fits_table_to_table(tbhdu):
# Copy over column meta-data
for idx, colname in enumerate(tbhdu.columns.names):
table[colname].unit = tbhdu.columns[colname].unit
- description = tbhdu.header.get('TCOMM' + str(idx + 1))
+ description = table.meta.pop('TCOMM' + str(idx + 1), None)
table[colname].meta['description'] = description
- ucd = tbhdu.header.get('TUCD' + str(idx + 1))
+ ucd = table.meta.pop('TUCD' + str(idx + 1), None)
table[colname].meta['ucd'] = ucd
return table
