spacetelescope/specviz

NIRSpec MOS simulation data won't load in specviz

aliciacanipe opened this issue · 2 comments

See JIRA ticket: https://jira.stsci.edu/browse/JDA-35

Data used for testing: MOS G235M simulation *cal.fits

Data location: /grp/jwst/wit4/nirspec/Muzerolle/Sim_products/

Method: tried loading multiple file types in specviz

Description:

Try loading pipeline product, *cal.fits (was told this is suppose to work in general, maybe not?):

Absolutely nothing happens, spectrum doesn’t load, no error message, no informational message

When loading pipeline product *x1d.fits:

Error loading dataset <class ‘KeyError’> “keyword ‘TUNIT1’ not found.”

In specutil:

I was able to load the *x1d.fits data, plot it, change units and multiply data.

Why does this work in specutils and not specviz?

Also, I did not have the option to set this as unprioritized.

@aliciacanipe I took a look at one of these files and it does not appear to be formatted the way that is expected for JWST spectral data products. How were these files generated?

In short, JWST spectral data products are expected to consist of an arbitrary number of table HDUs (named EXTRACT1D) which each contain all of the data associated with a single spectrum. This understanding is the result of discussions with the pipeline team about the expected format of these data products.

The files you provided seem to be laid out as a series of image HDUs where each HDU contains one component of a spectrum and there are multiple groups of image HDUs representing multiple spectra. There currently aren't any data loaders provided by specutils (which are used by specviz) that can correctly parse this format.

There have been some updates to specutils and specviz since the last DA build, but even with those updates these files will not load. However, there should be a more informative error message.

Can you be more specific about what you did to get this data to work in specutils? Is it possible that you have a custom loader that is allowing this to work for you?

@drdavella Steve Crawford set up JIRA/GitHub linking, so I'm going to close this ticket. It will now be tracked here: #675