-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nirspec ifu data fails to load in cubeviz with MJD errors #690
Comments
Pasting example of full traceback
|
How do you download that FITS file with direct URL? I don't want to bother with keyring and stuff. |
The error comes straight out of |
Either of the |
I see these warnings:
Is there a way to check if this file is compliant according to what we are supposed to support? I'll have to defer to @rosteen or @javerbukh here. Not sure how relevant, but this is what is being passed into the glue-astronomy translator at https://github.com/glue-viz/glue-astronomy/blob/4c5e6e78bcaa20d1723510f06bbe3070f2b1642a/glue_astronomy/translators/spectrum1d.py#L147 :
where wcs is:
|
@pllim is correct: the error comes from Note that the ultimate cause is the use of |
Reposting from JIRA -- A lot of discussion on Slack but my version of the event in tl;dr form is as follows; You can do one of the following:
This is how you can load this particular file into Cubeviz by grabbing its ASDF/GWCS. This code will need to be worked into the parser natively. But before the good stuff, we need this patch in Jdaviz to work around #588 or you will get traceback from the Collapse plugin on load (unrelated to this issue): --- a/jdaviz/configs/default/plugins/collapse/collapse.py
+++ b/jdaviz/configs/default/plugins/collapse/collapse.py
@@ -68,7 +68,7 @@ class Collapse(TemplateMixin):
if x.label == event['new']))
# Also set the spectral min and max to default to the full range
- cube = self._selected_data.get_object(cls=SpectralCube)
+ cube = self._selected_data.get_object(cls=Spectrum1D)
self.selected_subset = "None"
self.spectral_min = cube.spectral_axis[0].value
self.spectral_max = cube.spectral_axis[-1].value The good stuff you can copy and paste into a notebook to see for yourself (using Jdaviz with the above patch): from asdf.fits_embed import AsdfInFits
from glue.core import Component, Data
from jdaviz import Cubeviz cubeviz = Cubeviz(verbosity='warning')
cubeviz.app filename = 'jw00619-o094_t001_miri_ch1-long_s3d.fits'
data_label = 'my_cube'
with AsdfInFits.open(filename) as af:
bunit = af.tree['meta']['bunit_data']
data_arr = af.tree['data']
w = af.tree['meta']['wcs']
data = Data(label=data_label)
data.coords = w
comp = Component.autotyped(data_arr, units=bunit)
data.add_component(component=comp, label='data')
cubeviz.app.add_data(data, data_label)
cubeviz.app.add_data_to_viewer('flux-viewer', data_label) |
Alas, Pure GWCS support is blocked by glue-viz/glue-astronomy#59 ! |
Reporter: Brian Cherinka
Error loading cal_ver 1.2 NRS_IFU data into Cubeviz. Gives the following error:
Input values did not match the format class mjd: TypeError: Input values for mjd class must be finite doubles"
Steps to reproduce:
Blocked by:
🐱
DISCLAIMER: This issue was autocreated by the Jdaviz Issue Creation Bot on behalf of the reporter. If any information is incorrect, please contact Duy Nguyen
The text was updated successfully, but these errors were encountered: