Hide raw/auxiliary channels in the Browse preview panel#40
Merged
Conversation
The image viewer had 6 sidebar tabs (View, Process, ROI, Masks, Measure,
Export); the labels truncated ("Proc...", "Ma...", "Mea...") and the ROI/Masks
tabs were mostly empty forms. Combine them and reorder so labels fit.
- ROI and Masks now share a single "ROI/Mask" tab, each as a collapsible
section (reusing _collapsible_section, the same widget as the View tab's
"Spectroscopy overlay"). "Regions of interest" is expanded by default; "Masks"
starts collapsed. See the _sidebar_tab + panel wiring in
probeflow/gui/dialogs/image_viewer_build_mixin.py.
- Tab order is now View, Process, Measure, ROI/Mask, Export.
- The old "masks" tab key is aliased to the merged tab's index (no extra rail
entry); _show_sidebar_tab("masks") selects the tab and expands the Masks
section via self._mask_section_btn (image_viewer_chrome_mixin.py), so any
future mask-driven navigation still reveals the controls.
- Keyboard shortcuts renumbered to match the new on-screen order: Ctrl+1 View,
Ctrl+2 Process, Ctrl+3 Measure, Ctrl+4 ROI/Mask, Ctrl+5 Export
(probeflow/gui/viewer/shortcuts.py); the command->tab lambdas are unchanged.
Test: test_sidebar_merges_roi_mask_and_orders_tabs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Createc qPlus files declare many channels (e.g. createc_scan_preview_120nm.dat has Channels=40): 8 named signals (Z fwd/bwd, Current fwd/bwd, Frequency shift, Amplitude, Drive, Phase) followed by dozens of generic "Raw channel N" DAC slots (createc_dat.py). The read is correct, but the Browse info panel rendered a thumbnail for every plane, flooding the grid with auxiliary channels. Filter them out where the previews are produced: - Add is_raw_channel_name() in probeflow/gui/models.py (matches the generated "Raw channel N" / "Raw column N" placeholder names). - ChannelPreviewLoader.work() (probeflow/gui/workers.py) now skips raw planes: meta_ready carries only the named channels and previews are emitted by contiguous display position, so the panel slots line up unchanged. Falls back to showing all planes if none are named (never a blank grid). ChannelPreviewLoader is browse-only and meta_ready has a single consumer (ScanInfoPanel), so no panel/viewer changes are needed. The full header is untouched, so "Show all metadata" still reports every channel, and raw planes remain selectable by opening the file in the viewer. Tests: test_channel_preview_loader_hides_raw_channels, test_channel_preview_loader_keeps_all_when_all_raw, test_is_raw_channel_name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Createc qPlus files can declare many channels —
createc_scan_preview_120nm.datreports Channels = 40: 8 named signals (Z fwd/bwd, Current fwd/bwd, Frequency shift, Amplitude, Drive, Phase) plus 32 genericRaw channel NDAC slots. The Browse info panel rendered a thumbnail for every plane, flooding the grid.The read is correct (header genuinely says 40; data decompresses to 40 distinct planes). This is a presentational fix: hide the auxiliary planes in Browse.
Change
is_raw_channel_name()inprobeflow/gui/models.py— matches the generatedRaw channel N/Raw column Nplaceholders.ChannelPreviewLoader.work()(probeflow/gui/workers.py) skips raw planes:meta_readycarries only named channels; previews are emitted by contiguous display position so the panel slots line up with no panel change. Falls back to all planes if none are named (never a blank grid).ChannelPreviewLoaderis browse-only andmeta_readyhas a single consumer, so no panel/viewer changes are needed. The full header is untouched — "Show all metadata" still lists every channel, and raw planes stay selectable in the viewer.Scope (per request)
Browse panel only; raw channels hidden entirely (no "show all" toggle).
Tests
test_channel_preview_loader_hides_raw_channels,test_channel_preview_loader_keeps_all_when_all_raw,test_is_raw_channel_name; browse suites green (35),ruffclean. Verified on the real file: preview drops 40 → the 8 named channels.🤖 Generated with Claude Code