astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
167 stars 127 forks source link

Spectrum1D default loader doesn't read in uncertainties for JWST s3d data #802

Open PatrickOgle opened 3 years ago

PatrickOgle commented 3 years ago

When JWST s3d (spectral cube) data is read with Spectrum1D.read, it is not recognized as a known datatype, so the default loader is used. This loader reads in the flux data, but not the uncertainty data. Loaders should be modified to locate the ERR extension and use that as the Spectrum1D uncertainty.

jdavies-st commented 3 years ago

It looks like the correct loader is being used to read in the s3d data, but none of the JWST loaders read in the error arrays. This was because the s2d and x1d files currently do not have error arrays (they are not produced by drizzle).

But the s3d files produced by cube_build do! So it was an oversight to not have the s3d loader read the error array.

So let's call this a feature enhancement.

Also, the s2d files will soon have uncertainties once https://github.com/spacetelescope/jwst/issues/5798 is resolved, and this will mean the x1d files will also have error columns populated. So once this is completed, those loaders should also be updated

nmearl commented 3 years ago

Thanks for looking into this, @jdavies-st!