-
-
Notifications
You must be signed in to change notification settings - Fork 130
Description
I am using specutils and I am having a problem doing a simple thing.
I made a spectrum, call it "spec" and I saved it to a fits file using:
spec.write(fname+'.fits', format='tabular-fits', overwrite=True)
Then I read the exact same file using:
spec_test = Spectrum1D.read(fname+'.fits', format='tabular-fits')
However, this does not work. Any ideas?
I get the following errors, see below:
spec.write(fname+'.fits', format='tabular-fits', overwrite=True)
spec_test = Spectrum1D.read(fname+'.fits', format='tabular-fits')
Traceback (most recent call last):
Cell In[941], line 1
spec_test = Spectrum1D.read(fname+'.fits', format='tabular-fits')
File ~/anaconda3/lib/python3.10/site-packages/astropy/nddata/mixins/ndio.py:59 in call
return self.registry.read(self._cls, *args, **kwargs)
File ~/anaconda3/lib/python3.10/site-packages/astropy/io/registry/core.py:218 in read
data = reader(*args, **kwargs)
File ~/anaconda3/lib/python3.10/site-packages/specutils/io/default_loaders/tabular_fits.py:87 in tabular_fits_loader
return generic_spectrum_from_table(tab, wcs=wcs, **kwargs)
File ~/anaconda3/lib/python3.10/site-packages/specutils/io/parsing_utils.py:258 in generic_spectrum_from_table
raise IOError("Could not identify column containing the flux")
OSError: Could not identify column containing the flux