Skip to content

feat: throttled live preview during Record + Z-Stack acquisitions - #592

Merged
hongquanli merged 5 commits into
feat/record-zstack-acquisitionfrom
feat/record-zstack-live-preview
Sep 8, 2026
Merged

hongquanli merged 5 commits into
feat/record-zstack-acquisitionfrom
feat/record-zstack-live-preview

Conversation

@hongquanli

Copy link
Copy Markdown
Contributor

Stacked on #564 (merges after it; rebase onto master if #564 lands squashed).

Shows frames in the live display during Record + Z-Stack acquisitions, which were previously display-blind:

  • Recording phase: throttled tap in StreamingCapture (display_fn + display_fps), first frame always shown, then at RECORD_ZSTACK_DISPLAY_FPS (default 3 fps, _def.py/INI; 0 disables preview for both phases).
  • Z-stack phase: the inherited per-plane signal_new_image callback (previously wired to a no-op) now emits each captured plane.
  • Both paths funnel into QtRecordZStackController.image_to_display, connected to the same display slots as multipointController.image_to_display in every display config (no double-fire — verified against updateNapariConnections's napariLiveWidget skip).
  • No Qt in acquisition code: streaming_capture.py / record_zstack_worker.py / record_zstack_controller.py gain only plain callables/floats; Signal appears only in gui_hcs.py. Headless path unchanged (defaults None/0).
  • Preview can never harm a recording: a failing display callable logs once and disables preview for that capture; emitted count and zarr sealing are untouched (test-pinned).

Testing

  • 7 new tests (3 StreamingCapture throttle/error/off, 2 worker integration incl. pinning the per-plane callback at exactly planes×channels calls, 2 GUI funnel/zero-fps) — 154 tests green across the four affected suites (QT_API=pyqt5).
  • Per-task + whole-branch code review: no Critical/Important findings.
  • Sim-GUI E2E: real acquisition at Current Position, 1.5 s @ 10 fps → 4 preview frames reached the display signal (expected ~4 at 3 fps).

Design: AI-docs/Squid/to-do/2026-07-06-record-zstack-live-preview-design.md

🤖 Generated with Claude Code

@Alpaca233
Alpaca233 force-pushed the feat/record-zstack-acquisition branch from 0afae24 to d07b875 Compare July 27, 2026 21:30
hongquanli and others added 5 commits September 8, 2026 03:27
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…orker

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…STACK_DISPLAY_FPS

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ings

Review findings (sub-threshold but real): the _def.py comment said z-stack
planes 'always display' while the next sentence says 0 disables both phases;
and _on_frame's 'route + enqueue only' prose predated the preview tap.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…um rename

#579's multi-plane recording (now merged into feat/record-zstack-acquisition)
renamed RecordZStackAcquisitionParameters.recording_z_offset_um to
recording_bottom_z_offset_um and added recording_Nz/recording_dz_um. The
git merge of feat/record-zstack-acquisition didn't touch these two
already-passing tests textually, so they kept constructing the params with
the old keyword and failed after the merge.
@hongquanli
hongquanli force-pushed the feat/record-zstack-live-preview branch from 649295a to c715519 Compare September 8, 2026 10:30
@hongquanli
hongquanli merged commit c715519 into feat/record-zstack-acquisition Sep 8, 2026
3 checks passed
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