Repository navigation
tomo_flyscan: restore the rotation stage's speed when the scan ends - #107
Merged
Jakub Wlodek (jwlodek) merged 2 commits intoOct 23, 2026
Merged
Jakub Wlodek (jwlodek) merged 2 commits into
Jakub Wlodek (jwlodek) merged 2 commits into
Conversation
The motor's fly prepare leaves VELO at the fly speed and nothing set it back, so the stage stayed slow after every tomo fly scan (reported by Nghia Vo). Read VELO before the scan and put it back in the cleanup, however the scan ends. Assisted-by: copilot:claude-opus-5-5
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused fix uses the existing finalizer and includes regression coverage for both scan outcomes, with no unresolved findings.
No open issues 🎉
What changed in this PR
Restores the rotation stage’s original speed after tomo_flyscan, using the existing cleanup path for successful and failed scans.
Changes:
- Captures rotation velocity before the scan and restores it during cleanup.
- Adds mock regression tests for velocity restoration after success and failure.
| File | Description |
|---|---|
tests/tomography/test_flyscans.py |
Tests velocity restoration after successful and failed scans. |
src/hextools/tomography/flyscans.py |
Saves the original rotation velocity and restores it in cleanup. |
Review effort: Balanced
Jakub Wlodek (jwlodek)
requested changes
Oct 23, 2026
… from a closure Review (jwlodek): follow the pattern of other plans. Assisted-by: copilot:claude-opus-5-5
Jakub Wlodek (jwlodek)
approved these changes
Oct 23, 2026
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.
Reported on Slack (2026-10-23): the rotation stage's speed was not reset after the tomography fly scans run on 2026-10-22.
ophyd-async's
Motor.preparesets VELO to the fly speed and nothing set it back (tomography_alignment_scanalready restores it).tomo_flyscannow reads VELO before the scan and restores it in the cleanup, whether the scan succeeds or fails.Verified with: mock tests (
tests/tomography/test_flyscans.py, success and failure paths). Both failed before the fix (VELO left at 4.44 instead of 5.0). Not yet run at the beamline.