-
Notifications
You must be signed in to change notification settings - Fork 76
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
Fix 2D smooth visibility bug by utilizing SpectralExtraction linking logic #2023
Fix 2D smooth visibility bug by utilizing SpectralExtraction linking logic #2023
Conversation
Hmm... Test failed because the Gaussian Smooth plugin couldn't find the autocollapsed 1D spectrum. It's passing locally for me. Can anyone reproduce? |
jdaviz/configs/default/plugins/gaussian_smooth/tests/test_gaussian_smooth.py
Show resolved
Hide resolved
jdaviz/configs/default/plugins/gaussian_smooth/tests/test_gaussian_smooth.py
Outdated
Show resolved
Hide resolved
@pllim Fresh env installing the merge branch of this PR and testing directly out of I'm still confused why this is even happening. The autocollapsed spectrum is supposed to generate automatically. Why wouldn't it be available? |
I don't understand that part either but I cannot access the collapsed spectrum in Cubeviz from |
And the mystery continues @pllim! Windows and OSX CI is now passing 😱 ! The failure on 3.10 is due to an SSL error |
Tsk tsk, the failure is from astroquery, see #2021 |
🤯 Still failing for me locally. |
I'm in a fresh conda environment and I'm still unable to see the smoothed spectrum in specviz2d. Is that only me? |
Make sure you're selecting the 1d spectrum as the input. There is a separate ticket for fixing the 2d spectral smoothing (or maybe for now we should disable the 2D spectrum as input). |
Okay, so I know why it fails for me now but I dunno why it doesn't fail for everyone else. I get --- 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
msg = SnackbarMessage(
"Automatic spectrum extraction failed. See the spectral extraction"
" plugin to perform a custom extraction", |
@duytnguyendtn , it passes locally for me now. Thanks! |
BTW, CI should pass now if you rebase. FYI. |
That worked for me @kecnry thanks! I can approve once CI is green. |
I still think that pytest fixture should not have any input argument BTW. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving pending the fixture conversation being resolved with @pllim. Thanks for tracking this down!
Does need change log entry and rebasing/passing CI before merge though!
…und size Co-authored-by: P. L. Lim <[email protected]>
e8fbab4
to
a0def46
Compare
jdaviz/configs/default/plugins/gaussian_smooth/tests/test_gaussian_smooth.py
Outdated
Show resolved
Hide resolved
Codecov ReportBase: 92.05% // Head: 92.06% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2023 +/- ##
=======================================
Coverage 92.05% 92.06%
=======================================
Files 140 140
Lines 15287 15305 +18
=======================================
+ Hits 14073 14091 +18
Misses 1214 1214
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Co-authored-by: P. L. Lim <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, though one remaining nitpick on the name branding? Is it uppercase D or lowercase D?
@@ -73,6 +73,8 @@ Bug Fixes | |||
|
|||
* Loading valid data no longer emits JSON serialization warnings. [#2011] | |||
|
|||
* Fixed linking issue preventing smoothed spectrum from showing in Specviz2D. [#2023] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Fixed linking issue preventing smoothed spectrum from showing in Specviz2D. [#2023] | |
* Fixed linking issue preventing smoothed spectrum from showing in Specviz2d. [#2023] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs have it as capital D: https://jdaviz.readthedocs.io/en/latest/specviz2d/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, weird. I thought I remember we agreed to rebrand so that only first letter is capitalized (when we dropped the capital V). Also the class name has lowercase "d".
jdaviz/jdaviz/configs/specviz2d/helper.py
Line 12 in 71a514c
class Specviz2d(ConfigHelper, LineListMixin): |
Now I am confused. But I guess this discussion should not block merge. I already approved. Thanks for your patience!
Failure is due to unrelated |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
Fix 2D smooth visibility bug by utilizing SpectralExtraction linking logic (cherry picked from commit bcb981e)
…on-v3.3.x Manual Backport PR #2023 on branch v3.3.x (Fix 2D smooth visibility bug by utilizing SpectralExtraction linking logic)
Description
Big thanks to Jesse and Kyle for the hack session that found this solution! This PR fixes #1956 by borrowing the linking logic from the Spectral Extraction plugin for any non-cube linking scenarios.
Turns out the fix is slightly more complicated than the one we figured out together; the linking logic for Spectral Extraction doesn't work for smoothed data being linked against cubes (mainly in the case of Cubeviz). Because Cubeviz wasn't impacted by this bug to begin with, and the observation that the Spectral Extraction linking logic works for Specviz too, I preserved the original logic for gaussian smooth linking in Cubeviz, while using the Spectral Extraction linking logic for the
ndim < 3
usecase.Fixes #1956
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.