-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
slice: refactor plugin to decouple from cube (#2715)
* refactor slice plugin * allow tool to become default when first becoming visible * allow downstream to override slice axis * allow for multiple viewers with indicators by using mixins for WithSliceIndicator or WithSliceSelection * decouple slice axis from cube and replace with optional "snap to slice" functionality * initialize original slice location to middle of first found data layer * re-implement play/increment functionality * and add decrement since slider no longer exists * slice indicator: use sci notation only if necessary * initialize value_unit in cubeviz * fix jittering indicator * delay snap to slice while inputting number * implement deprecated API access to slice * changelog entry * update docs * support test data * deprecate cubeviz_helper.select_slice * edge checks and wrapping support in cube play functionality * update tests * reproduce previous logic for init slice * do not allow disabling snapping in cubeviz * but keep support for downstream * avoid calls to viewer.data() * ap phot: determine slice-index on the fly instead of relying on plugin * update even more tests * read slice component from x_att to support wave/wavelength/freq/frequency/wavenumber/velocity/energy * handle cubes passing int to slice value * further support for flexible x_att handling * more test updates * fix support for slice axis given in integers * remove comment * fix play support when slices are integers * allow initializing when slice axis is pixel * always label as "value" in UI * can always change to be more intelligent based on data and x-display-unit later * don't allow starting playing if no slices (this would have quite immediately after otherwise, but is hard to reliably test since that is threaded) * DOC: Use new API in concept notebook
- Loading branch information
Showing
20 changed files
with
528 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.