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

use correct spectral density equivalencies for marker unit changes #3219

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

gibsongreen
Copy link
Contributor

@gibsongreen gibsongreen commented Oct 15, 2024

Description

This pull request is to address updating the spectral density equivalencies to use the original spectral axis so plugin Markers update to the correct position on the spectrum after a unit change.

Original Behavior:

Untitled3.mov

Updated Behavior:

Untitled.2.mov

Change log entry

  • Is a change log needed? If yes, is it added to 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, maintainer
    should 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.

  • Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the trivial label.
  • Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
  • Do the proposed changes follow the STScI Style Guides?
  • Are tests added/updated as required? If so, do they follow the STScI Style Guides?
  • Are docs added/updated as required? If so, do they follow the STScI Style Guides?
  • Did the CI pass? If not, are the failures related?
  • Is a milestone set? Set this to bugfix milestone if this is a bug fix and needs to be released ASAP; otherwise, set this to the next major release milestone. Bugfix milestone also needs an accompanying backport label.
  • After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?

@gibsongreen gibsongreen added bug Something isn't working cubeviz specviz labels Oct 15, 2024
@gibsongreen gibsongreen added this to the 4.0 milestone Oct 15, 2024
@gibsongreen gibsongreen changed the title get spectral density equivalencies from original quantities use correct spectral density equivalencies for marker unit changes Oct 15, 2024
jdaviz/core/marks.py Outdated Show resolved Hide resolved
@pllim
Copy link
Contributor

pllim commented Oct 15, 2024

Thanks. Is it possible to add regression test that fails on main but passes here?

@cshanahan1
Copy link
Contributor

(i think this will be fixed by my related ticket btw)

@pllim
Copy link
Contributor

pllim commented Oct 15, 2024

i think this will be fixed by my related ticket btw

Does that mean this PR is a duplicate and unnecessary?

@cshanahan1
Copy link
Contributor

yes but i think its fine as a patch

@pllim
Copy link
Contributor

pllim commented Oct 15, 2024

@cshanahan1 , so is your plan to revert this in your PR, or undo your patch over there?

@cshanahan1
Copy link
Contributor

@cshanahan1 , so is your plan to revert this in your PR, or undo your patch over there?

it will just be a one line swap, and test coverage

Copy link

codecov bot commented Oct 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.56%. Comparing base (56e1ded) to head (9d67b5d).
Report is 2 commits behind head on main.

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

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

@gibsongreen
Copy link
Contributor Author

gibsongreen commented Oct 15, 2024

Thanks. Is it possible to add regression test that fails on main but passes here?

I added some test coverage that addresess changes to the flux unit. I wrote additional coverage for translations in Cubeviz that I think should go in a small follow up after @cshanahan1 PR.

This is the test on main with the example notebook and the values for the spectrum slice flux and the marker flux:

Screenshot 2024-10-15 at 6 59 04 PM

Copy link
Contributor

@pllim pllim left a comment

Choose a reason for hiding this comment

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

Thanks!

@gibsongreen gibsongreen added the trivial Only needs one approval instead of two label Oct 17, 2024
@rosteen rosteen merged commit bef7a00 into spacetelescope:main Oct 17, 2024
25 checks passed
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 specviz trivial Only needs one approval instead of two
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants