feat: Add acquisition state machine for pause/resume/retake functionality#496
Draft
Alpaca233 wants to merge 2 commits intoCephla-Lab:masterfrom
Draft
feat: Add acquisition state machine for pause/resume/retake functionality#496Alpaca233 wants to merge 2 commits intoCephla-Lab:masterfrom
Alpaca233 wants to merge 2 commits intoCephla-Lab:masterfrom
Conversation
Design documents for: - Timepoint-level state machine for pause/resume/retake workflow - QC system with per-FOV metrics collection and timepoint-end policy checks Key design decisions: - No acquisition-level state machine, just tracking variables - Four timepoint states: ACQUIRING, PAUSED, RETAKING, CAPTURED - QC runs as Job in subprocess for parallel execution - QC policy evaluates metrics at timepoint end, flags FOVs for review - Extensible for future immediate per-FOV pause Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…lity Implement timepoint-level state machine enabling users to pause mid-acquisition, review captured images, and retake specific FOVs before proceeding. New components: - TimepointStateMachine: Thread-safe state machine with states ACQUIRING, PAUSED, RETAKING, and CAPTURED - FOVIdentifier: Immutable dataclass for identifying FOVs by region and index Integration: - MultiPointWorker checks for pause requests at FOV boundaries - MultiPointWorker stores FOV coordinates for retake support - MultiPointController exposes request_pause(), request_resume(), request_retake(), and abort_retake() methods - New signals: signal_state_changed, signal_paused, signal_resumed, signal_retake_started, signal_retakes_complete Co-Authored-By: Claude Opus 4.5 <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.
Summary
Changes
New files:
control/core/state_machine.py- Core state machine withTimepointStateMachineclass andFOVIdentifierdataclasstests/control/test_state_machine.py- 28 unit tests covering state transitions, thread safety, and abort behaviorModified files:
control/core/multi_point_utils.py- Added signals for state changes, pause, resume, and retake eventscontrol/core/multi_point_worker.py- Integrated state machine into acquisition loop with pause checks and retake supportcontrol/core/multi_point_controller.py- Exposesrequest_pause(),request_resume(),request_retake(),abort_retake()methodsState Machine Design
States:
ACQUIRING→PAUSED↔RETAKING→CAPTUREDTest plan
--simulationmode🤖 Generated with Claude Code