Skip to content

Hide raw/auxiliary channels in the Browse preview panel#40

Merged
jacobson30-bot merged 2 commits into
mainfrom
ui/limit-browse-channels
Jun 15, 2026
Merged

Hide raw/auxiliary channels in the Browse preview panel#40
jacobson30-bot merged 2 commits into
mainfrom
ui/limit-browse-channels

Conversation

@jacobson30-bot

Copy link
Copy Markdown
Contributor

What

Createc qPlus files can declare many channels — createc_scan_preview_120nm.dat reports Channels = 40: 8 named signals (Z fwd/bwd, Current fwd/bwd, Frequency shift, Amplitude, Drive, Phase) plus 32 generic Raw channel N DAC 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() in probeflow/gui/models.py — matches the generated Raw channel N / Raw column N placeholders.
  • ChannelPreviewLoader.work() (probeflow/gui/workers.py) skips raw planes: meta_ready carries 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).

ChannelPreviewLoader is browse-only and meta_ready has 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), ruff clean. Verified on the real file: preview drops 40 → the 8 named channels.

🤖 Generated with Claude Code

jacobson30-bot and others added 2 commits June 15, 2026 16:13
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>
@jacobson30-bot jacobson30-bot merged commit e84d69b into main Jun 15, 2026
3 checks passed
@jacobson30-bot jacobson30-bot deleted the ui/limit-browse-channels branch June 15, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant