specutils icon indicating copy to clipboard operation
specutils copied to clipboard

Add a functional `write()` method to SpectrumList

Open tbowers7 opened this issue 3 years ago • 1 comments

The desired output of SpectrumList.write() would be a multiextension FITS file, where each extension contains the information from a single Spectrum1D object. The primary HDU could contain information about the number of included spectra, and possibly any common FITS keywords among the constituent Spectrum1D objects' metadata.


The current error message when one attempts to use the write() method is:

astropy.io.registry.base.IORegistryError: No writer defined for format 'tabular-fits' and class 'SpectrumList'.

The available formats are:

Format Read Write Auto-identify
------ ---- ----- -------------

tbowers7 avatar Sep 16 '22 22:09 tbowers7

Probably along the lines of this custom writer / loader, but less kludgy.

tbowers7 avatar Sep 20 '22 21:09 tbowers7