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

BUG: Fix parsing of MANGA cube (try 2) #3119

Closed pllim closed 2 months ago

pllim commented 2 months ago

Description

This pull request is to fix loading MANGA cube in Cubeviz. Since Brian C said it works on Jdaviz 3.10 series, probably no need to backport.

This supersedes #3115 and takes advantage of the loaders that already exist in specutils when we can, like Brian Cherinka suggested. Also convert uncert type to stddev when we can, like Brett Morris suggested.

I tried to get rid of _parse_hdulist altogether but too many tests failed, so I kept it as a fallback.

Also fixed a Marker display bug where wavelength shows as 0.000 m, which is very uninformative.

Change log entry

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.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 88.89%. Comparing base (5a020cc) to head (b80fb8a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3119 +/- ## ========================================== + Coverage 88.88% 88.89% +0.01% ========================================== Files 112 112 Lines 17391 17396 +5 ========================================== + Hits 15458 15465 +7 + Misses 1933 1931 -2 ```

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

pllim commented 2 months ago

@havok2063 , would this work for your use case? Can you please try it out? Thanks!

pllim commented 2 months ago

Rebased to get rid of merge conflicts.

pllim commented 2 months ago

Thanks for the reviews!