specutils icon indicating copy to clipboard operation
specutils copied to clipboard

Inconsistant expectation for location of header data (vs. other metadata)

Open cshanahan1 opened this issue 2 years ago • 2 comments

The location of header keywords is inconsistent - wcs1d_fits writer will update the output header with anything in the spectrum.meta dictionary. Tabular fits expects header-specific keys to be in meta.header, as a fits.Header object (and will ignore it if its a dictionary). I'm not sure what the other readers/writers do, but it is inconsistent at least in these. Because there can be other information in meta that might not belong in the fits file header, meta.header is preferable (either as dict or Header?)

(Issue made after discussion with @kelle @havok2063, @tepickering)

cshanahan1 avatar Nov 15 '23 21:11 cshanahan1

See previous discussion in #617 – roughly speaking I think half of the other specialised loaders handle it one way, the rest the other, and at the time the discussion never wrapped up to a conclusion.

dhomeier avatar Nov 16 '23 15:11 dhomeier

Also relevant to #1101 , which is about documentation. I think we should at least be honest about the situation in the documentation and give people a suggestion for what to do moving forward with new reader/writers.

kelle avatar Nov 16 '23 20:11 kelle