SIMPLE-AstroDB / SIMPLE-db

BSD 3-Clause "New" or "Revised" License
11 stars 22 forks source link

Standardize spectra files? #212

Closed kelle closed 9 months ago

kelle commented 2 years ago

As we ingest spectra, and work towards having them all load as Spectrum1D objects, maybe we want to write them out as something different than the file we currently have (e.g., an IDL or IRAF generated FITS file). What is that something? A FITS file generated with Spectrum1d.write or something different?

kelle commented 2 years ago

Based on some useful info from Derek Homeier and Nick Earl, I'm thinking we should use the Spectrum1D object saved in wcs1d-fits format. This will enable us to have a header and fully defined dispersion axis. https://specutils.readthedocs.io/en/stable/spectrum1d.html#providing-a-fits-style-wcs

I might need some help figuring out how to go from a wavelength array to a fits style WCS.

Also, I'm thinking we'll want a new field for this. I think we should have a link to the "original", author provided spectrum and another link to a spectrum which can be read by specutils.

kelle commented 2 years ago

new column = original_spectrum in most cases, original_spectrum will be null. only put file name if we generate a new spectrum. GOAL: all files in spectrum column be readable by specutils.

kelle commented 2 years ago

When we write new spectra files, we will write them as tabular-fits format and include meta/header data is the .meta attribute, using ObsCore keywords for new data and preserving any pre-existing headers in whatever format it was made.

Will-Cooper commented 2 years ago

As discussed, this is perhaps a wider astropy-standard issue?

kelle commented 2 years ago
kelle commented 2 years ago

Lots of progress on this in PR #276

kelle commented 9 months ago

This is all in progress.