-
Notifications
You must be signed in to change notification settings - Fork 75
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
TST: test_cubeviz_aperphot_cube_orig_flux fails with RuntimeError: NULL error object in wcslib #2805
Comments
A quick search turned up the same error getting solved in 2014 in astropy, don't see how that could be related though |
Here's a diff between the
|
The test case seems very broken on my machine but I need someone else to confirm. Please run this locally with Jdaviz from
This test case used to work fine. Now it does not but I don't see any traceback in the notebook nor snackbar. import numpy as np
from astropy.io import fits
from jdaviz import Cubeviz
def image_cube_hdu_obj_microns():
# Basic rectangle ramp for aperture photometry test.
a = np.zeros((8, 9, 10)).astype(np.float32) # (nz, ny, nx)
for i in range(8):
a[i, :5, :3] = i + 1
flux_hdu = fits.ImageHDU(a)
flux_hdu.name = 'FLUX'
uncert_hdu = fits.ImageHDU(np.zeros((8, 9, 10)).astype(np.float32))
uncert_hdu.name = 'ERR'
mask_hdu = fits.ImageHDU(np.ones((8, 9, 10)).astype(np.uint16))
mask_hdu.name = 'MASK'
wcs = {
'WCSAXES': 3, 'CRPIX1': 38.0, 'CRPIX2': 38.0, 'CRPIX3': 1.0,
'CRVAL1': 205.4384, 'CRVAL2': 27.004754, 'CRVAL3': 4.890499866509344,
'CTYPE1': 'RA---TAN', 'CTYPE2': 'DEC--TAN', 'CTYPE3': 'WAVE',
'CUNIT1': 'deg', 'CUNIT2': 'deg', 'CUNIT3': 'um',
'CDELT1': 3.61111097865634E-05, 'CDELT2': 3.61111097865634E-05, 'CDELT3': 0.001000000047497451, # noqa
'PC1_1 ': -1.0, 'PC1_2 ': 0.0, 'PC1_3 ': 0,
'PC2_1 ': 0.0, 'PC2_2 ': 1.0, 'PC2_3 ': 0,
'PC3_1 ': 0, 'PC3_2 ': 0, 'PC3_3 ': 1,
'DISPAXIS': 2, 'VELOSYS': -2538.02,
'SPECSYS': 'BARYCENT', 'RADESYS': 'ICRS', 'EQUINOX': 2000.0,
'LONPOLE': 180.0, 'LATPOLE': 27.004754,
'MJDREFI': 0.0, 'MJDREFF': 0.0, 'DATE-OBS': '2014-03-30'}
flux_hdu.header.update(wcs)
flux_hdu.header['BUNIT'] = '1E-17 erg*s^-1*cm^-2*Angstrom^-1'
uncert_hdu.header['BUNIT'] = '1E-17 erg*s^-1*cm^-2*Angstrom^-1'
return fits.HDUList([fits.PrimaryHDU(), flux_hdu, uncert_hdu, mask_hdu])
cubeviz = Cubeviz()
cubeviz.load_data(image_cube_hdu_obj_microns(), data_label="test")
cubeviz.show() |
The test passes for me locally if I downgrade |
argh https://github.com/glue-viz/glue/releases/tag/v1.19.0 was released 6 hours ago. Maybe you found the culprit! |
The problematic commit is glue-viz/glue@9f7929d - will investigate more |
Superseded by #2811 |
Example log: https://github.com/spacetelescope/jdaviz/actions/runs/8706207800/job/23883214225
I started noticing this after merging #2802 but that PR had all green CI checks. I can also reproduce this error locally though it was initially green but only started failing after I reinstalled some packages, so the green was probably due to an outdated cache somewhere. This test does not use any remote data. It is not immediately clear to me why it is suddenly failing and why the error is all the way in
wcslib
.The test:
jdaviz/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py
Line 10 in 620ccfe
The offending call:
jdaviz/jdaviz/configs/cubeviz/plugins/tests/test_cubeviz_aperphot.py
Lines 62 to 63 in 620ccfe
The data used:
jdaviz/jdaviz/conftest.py
Lines 102 to 135 in 620ccfe
🐱
The text was updated successfully, but these errors were encountered: