Skip to content
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

Backport PR #3358 on branch v4.0.x (Fix aperture weight mask with loaded mask cube) #3360

Merged

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Dec 16, 2024

Manual backport of #3358.

@rosteen rosteen added bug Something isn't working cubeviz plugin Label for plugins common to multiple configurations labels Dec 16, 2024
@rosteen rosteen added this to the 4.0.1 milestone Dec 16, 2024
… mask cube

Fix aperture weight mask with loaded mask cube (spacetelescope#3358)

* Track loaded mask cube in cubeviz

* Don't save DQ array as loaded_mask for JWST

* Add extraction test on file with mask

* Codestyle

* Add consideration of loaded mask to aperture weight mask

* Remove duplicate test, codestyle

* Changelog

* Update jdaviz/configs/cubeviz/plugins/tests/test_parsers.py

Co-authored-by: P. L. Lim <[email protected]>

* Cast this as bool here

* Fix tests, address review comments

* adding regression tests to manga mask

* Update jdaviz/configs/cubeviz/plugins/spectral_extraction/spectral_extraction.py

Co-authored-by: Brett M. Morris <[email protected]>

---------

Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: Brett M. Morris <[email protected]>
Co-authored-by: Brett M. Morris <[email protected]>
(cherry picked from commit 92390e2)
@rosteen rosteen force-pushed the auto-backport-of-pr-3358-on-v4.0.x branch from 9a31b38 to 1cf6d9e Compare December 16, 2024 19:35
@rosteen rosteen added the no-changelog-entry-needed changelog bot directive label Dec 16, 2024
@rosteen
Copy link
Collaborator Author

rosteen commented Dec 16, 2024

Argh, the new MaNGA test is still slightly off from the result on main, must be getting affected by something we didn't backport.

@rosteen
Copy link
Collaborator Author

rosteen commented Dec 16, 2024

I think it's because of the update to Cubeviz parsing that then required a minor fix for MaNGA...the difference is small enough (and we have an independent test that's showing this behavior is working) that I'm ok bumping the RTOL here at this point.

@pllim
Copy link
Contributor

pllim commented Dec 16, 2024

I think it's because of the update to Cubeviz parsing that then required a minor fix for MaNGA

Do you remember which PR?

@rosteen
Copy link
Collaborator Author

rosteen commented Dec 16, 2024

I think it must be #3307

@rosteen
Copy link
Collaborator Author

rosteen commented Dec 16, 2024

(which fixed MaNGA loading after #3221)

@pllim
Copy link
Contributor

pllim commented Dec 16, 2024

Tsk tsk... always Past Me that shows up lol... I agree that it is ok to bump rtol now.

se.extract()
extracted_max = cubeviz_helper.get_data("Spectrum (mean)").max()
assert_allclose(extracted_max.value, 2.836957E-18, rtol=1E-5)
Copy link
Contributor

@bmorris3 bmorris3 Dec 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

given that the tolerance was larger before I suggested a smaller one, I don't feel bad bumping it up.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it was larger due to exactly this, and I had hopes that it wouldn't be necessary now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'll just bump it back up on 4.0.1 since there are no objections.

@rosteen rosteen merged commit a56888b into spacetelescope:v4.0.x Dec 16, 2024
17 checks passed
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.62%. Comparing base (be5caf3) to head (73b7a43).
Report is 1 commits behind head on v4.0.x.

Additional details and impacted files
@@            Coverage Diff             @@
##           v4.0.x    #3360      +/-   ##
==========================================
- Coverage   88.62%   88.62%   -0.01%     
==========================================
  Files         125      125              
  Lines       18819    18822       +3     
==========================================
+ Hits        16679    16681       +2     
- Misses       2140     2141       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cubeviz no-changelog-entry-needed changelog bot directive plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants