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

fix display units moment maps #3169

Closed
wants to merge 5 commits into from

Conversation

cshanahan1
Copy link
Contributor

@cshanahan1 cshanahan1 commented Aug 27, 2024

(This is needed for #3144)

This fixes an issues where the moment map plugin was incorrectly picking up changes to display unit. It was responding to changes in the spectral y axis, including toggling between flux and surface brightness. The outputs of moment 0 should always be the same type (flux or sb) as the data units (which will, after 3144 is merged, always be surface brightness), and should not be tied to what the spectrum viewer axis is toggled to. Additionally, units were being obtained on global display unit changed and again when moment map was computed, which wasn't necessary to do.

These issues were causing moment map calculation to fail for any cubes loaded in surface brightness units (to reproduce this bug, try calculating a 0th moment with the cubeviz example notebook, it fails). This wasn't being picked up by tests because all the tests fixtures used in moment map tests have cubes that are in flux units. The basic moment map test is now being tested with a cube in Jy, and one in Jy / sr.

@github-actions github-actions bot added cubeviz plugin Label for plugins common to multiple configurations labels Aug 27, 2024
Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.43%. Comparing base (c3d0c81) to head (87727da).
Report is 17 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3169      +/-   ##
==========================================
+ Coverage   88.42%   88.43%   +0.01%     
==========================================
  Files         122      122              
  Lines       18267    18261       -6     
==========================================
- Hits        16153    16150       -3     
+ Misses       2114     2111       -3     

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

@cshanahan1 cshanahan1 added this to the 4.0 milestone Aug 27, 2024
@cshanahan1
Copy link
Contributor Author

(closing this, changes are in 3144)

@cshanahan1 cshanahan1 closed this Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cubeviz plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant