specutils icon indicating copy to clipboard operation
specutils copied to clipboard

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

Open PatrickOgle opened this issue 3 years ago • 2 comments

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.

PatrickOgle avatar Apr 01 '21 13:04 PatrickOgle

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

jdavies-st avatar Apr 01 '21 16:04 jdavies-st

Thanks for looking into this, @jdavies-st!

nmearl avatar Apr 01 '21 16:04 nmearl