jdaviz
jdaviz copied to clipboard
Cubeviz to use wcs1d-fits from specutils to write out fitted cube
Description
This pull request is to remove the unreleased jdaviz-cube writer we added in #2012 and use the improved specutils wcs1d-fits writer that Derek modifed in https://github.com/astropy/specutils/pull/1009 .
Close #2044
Blocked by
- [x]
wcs1d-fitsencounters error with bool mask, so need https://github.com/astropy/specutils/pull/1051 - [ ] Update specutils pin again when https://github.com/astropy/specutils/pull/1051 is released (>1.10)
- [x] https://github.com/astropy/specutils/pull/1009 and the fix above need to be released and then we have to update minversion pin for specutils.
- [x] If this PR does not make it to jdaviz v3.4, we also need to modify change log (and doc?) to withdraw a released feature.
Change log entry
- [x] 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 toCHANGES.rstbefore merge. If no, maintainer should add ano-changelog-entry-neededlabel.
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.
- [x] Are two approvals required? Branch protection rule does not check for the second approval. If a second approval is not necessary, please apply the
triviallabel. - [ ] Do the proposed changes actually accomplish desired goals? Also manually run the affected example notebooks, if necessary.
- [x] Do the proposed changes follow the STScI Style Guides?
- [x] Are tests added/updated as required? If so, do they follow the STScI Style Guides?
- [x] 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?
- [x] 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.
- [ ] After merge, any internal documentations need updating (e.g., JIRA, Innerspace)?
@pllim astropy/specutils#1051 has now passed all tests, so you might try it for the bool mask here.
@dhomeier , thanks, I'll put it on my queue.
I thought @dhomeier fixed this in his specutils PR? 🤯
> self._bitpix = DTYPE2BITPIX[data.dtype.name]
E KeyError: 'bool'
Yes, should have, but it's not in 1.10.0 yet.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 88.88%. Comparing base (
3de1b08) to head (3b00e22). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2094 +/- ##
==========================================
- Coverage 88.91% 88.88% -0.03%
==========================================
Files 111 111
Lines 17365 17348 -17
==========================================
- Hits 15440 15420 -20
- Misses 1925 1928 +3
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think at long last, this PR is finally ready because upstream fix has been released since.
Not sure why RTD status report is stuck (PR too old? lol) but the build was successful: https://readthedocs.org/projects/jdaviz/builds/25146976/
Hm, this works for writing out a model fit cube, but interestingly, it fails if you try to write out the original data cube that was loaded into Cubeviz (at least that's what I'm seeing with the example notebook). That also fails to write on main with format="jdaviz-cube" though, and based on the title of this PR is maybe out of scope.
it fails if you try to write out the original data cube that was loaded into Cubeviz
Pretty sure that was a separate ticket. I don't think we support complete I/O roundtripping anywhere yet.
it fails if you try to write out the original data cube that was loaded into Cubeviz
Pretty sure that was a separate ticket. I don't think we support complete I/O roundtripping anywhere yet.
In that case I'll go ahead and approve this.
Rebased to see if RTD would report back this time. Thanks for the review!