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 unit handling in continuum and moment calculations #3216

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rosteen
Copy link
Collaborator

@rosteen rosteen commented Oct 8, 2024

Fixes calculating moment 0 when display unit is in Hz, and more generally uses display unit more consistently in all continuum calculations.

@rosteen rosteen added bug Something isn't working cubeviz plugin Label for plugins common to multiple configurations labels Oct 8, 2024
@rosteen rosteen added this to the 4.0 milestone Oct 8, 2024
Comment on lines -2973 to +2974
full_spectrum = self.app._jdaviz_helper.get_data(self.dataset.selected)
full_spectrum = self.app._jdaviz_helper.get_data(self.dataset.selected,
use_display_units=True)
Copy link
Member

Choose a reason for hiding this comment

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

I feel like @cshanahan1 had just removed this. Was there a reason for that or did it just not seem to affect that use-case (see https://github.com/spacetelescope/jdaviz/pull/3211/files#r1787615549)

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.56%. Comparing base (99baa91) to head (5270ce4).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3216   +/-   ##
=======================================
  Coverage   88.56%   88.56%           
=======================================
  Files         125      125           
  Lines       18751    18755    +4     
=======================================
+ Hits        16606    16610    +4     
  Misses       2145     2145           

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

@gibsongreen
Copy link
Contributor

In testing I am still seeing the traceback occur for moment zero (and it is occurring if you chose any spectral unit we allow).

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 plugin Label for plugins common to multiple configurations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants