spacetelescope / jdaviz

JWST astronomical data analysis tools in the Jupyter platform
https://jdaviz.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
138 stars 73 forks source link

Skip flux conversion for moment maps #3158

Closed rosteen closed 1 month ago

rosteen commented 1 month ago

Looks like #3139 broke adding moment maps to a viewer, due to the coords_info logic. This skips the flux conversion that breaks it in the case of moment-like units (velocity and higher powers of it) by skipping any unit with incompatible physical type.

~Additionally, calculating moment 0 in flux when the cube is in surface brightness seemed to be broken (again?) so I moved the unit conversion to be before the moment calculation, so we can convert, e.g., MJy/sr to MJy and not have to worry about the extra wavelength unit that comes in via the moment calculation.~

~I also took this opportunity to bump the specutils pin and get rid of the handling for the change in 1.16 for the dev tests and such.~

kecnry commented 1 month ago

Does any of this overlap or conflict with #3116? (cc @bmorris3)

rosteen commented 1 month ago

Whoops, it almost certainly does. I should have stuck to fixing the first bug I found 😆

rosteen commented 1 month ago

I could split out the changes to coords_info.py, @bmorris3 should check this to make sure I was actually fixing the same things, if I wasn't the other changes can stay.

rosteen commented 1 month ago

Alright, after talking with @bmorris3 offline I dropped the stuff that overlapped with #3116 and kept the fix to the mouseover for things in incompatible units like velocity.

pllim commented 1 month ago

There is a conflict. Please rebase.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.42%. Comparing base (a9b559b) to head (535727f). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3158 +/- ## ======================================= Coverage 88.42% 88.42% ======================================= Files 122 122 Lines 18264 18267 +3 ======================================= + Hits 16150 16153 +3 Misses 2114 2114 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.