-
Notifications
You must be signed in to change notification settings - Fork 74
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: Fix failing tests in devdeps job #1877
Comments
I can reproduce the error when I install specreduce 1.2.1.dev36+g05a174d (as opposed to released version). There is no error from specreduce but it also does not show the collapsed spectrum. |
Actually there is an extraction error but it was sent to snackbar, so automated test suite didn't catch it.
|
I submitted astropy/specreduce#151 for the upstream portion. After speaking with @kecnry , the rest of the errors in jdaviz is not worth fixing right now and should wait for these:
Since specreduce dev is going through a lot of API changes right now, we should not test against it. Instead, I have advised specreduce dev to test locally against jdaviz (with FWIW, this will let you see the error: --- a/jdaviz/configs/specviz2d/helper.py
+++ b/jdaviz/configs/specviz2d/helper.py
@@ -194,6 +194,7 @@ class Specviz2d(ConfigHelper, LineListMixin):
try:
spext.export_extract_spectrum(add_data=True)
except Exception:
+ raise And this fixed 3 of the 4 errors (together with the upstream patch mentioned above): --- a/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py
+++ b/jdaviz/configs/specviz2d/plugins/spectral_extraction/spectral_extraction.py
@@ -814,9 +814,12 @@ class SpectralExtraction(PluginTemplateMixin):
defined in the plugin.
"""
bg = self.export_bg(**kwargs)
-
- bg_sub_spec = Spectrum1D(spectral_axis=self.bg_dataset.selected_obj.spectral_axis,
- flux=bg.sub_image()*self.bg_dataset.selected_obj.flux.unit)
+ bg_sub_img = bg.sub_image()
+ if isinstance(bg_sub_img, Spectrum1D):
+ bg_sub_spec = bg_sub_img
+ else:
+ bg_sub_spec = Spectrum1D(spectral_axis=self.bg_dataset.selected_obj.spectral_axis,
+ flux=bg_sub_img*self.bg_dataset.selected_obj.flux.unit) |
As seen in #1873. Need to investigate failures of Specviz2d tests that use https://stsci.box.com/shared/static/exnkul627fcuhy5akf2gswytud5tazmw.fits . Maybe the file is too old and we need to use a real JWST 2D spectrum from MAST.
The text was updated successfully, but these errors were encountered: