Repository navigation
Profile conversion 5b: xrd_jog - #12
Merged
Anthony Sligar (sligara7) merged 1 commit intoOct 23, 2026
Merged
Anthony Sligar (sligara7) merged 1 commit into
Anthony Sligar (sligara7) merged 1 commit into
Conversation
Port of pdf-profile-collection jog/rocking_ct (70-jog_scans.py) onto the ophyd-async detectors: the sweep lasts one averaged image, alternates direction, and the motor velocity is restored afterwards. Assisted-by: copilot:claude-opus-5-5
Anthony Sligar (sligara7)
merged commit Oct 23, 2026
377dfad
into
NSLS2:pdf-profile-conversion
4 checks passed
There was a problem hiding this comment.
🟡 Changes recommended
Failure cleanup can restore velocity during an active sweep or skip restoration when shutter closure fails.
2 open issues
What changed in this PR
Ports the legacy jog acquisition plan into pdftools.xrd as xrd_jog and makes it available in the collection profile.
Changes:
- Adds alternating motor sweeps timed to averaged images, plus a no-travel mode.
- Adds shutter handling and motor-velocity restoration.
- Adds mock tests for sweep behavior, no-travel acquisition, and detector-failure cleanup.
| File | Description |
|---|---|
| tests/test_xrd_jog.py | Tests acquisition behavior and failure cleanup. |
| src/pdftools/xrd.py | Implements the xrd_jog acquisition plan. |
| src/pdftools/profiles/collection.py | Exposes xrd_jog in the profile session. |
Review effort: Balanced
Comment on lines
+405
to
+406
| yield from bps.trigger_and_read(list(detectors)) | ||
| yield from bps.wait(group=group) |
Comment on lines
+417
to
+419
| if use_shutter: | ||
| yield from bps.mv(shutter, "Close") | ||
| yield from bps.mv(motor.velocity, velocity) |
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.


Ports the old
jog/rocking_ct(70-jog_scans.py) asxrd_joginpdftools.xrd, loaded into the profile session.Each image is taken while the motor sweeps from one end to the other at the speed that makes the sweep last one averaged image (
exposure_time × images_to_average); the next image sweeps back.start == stoptakes images without moving. The motor's velocity is restored andfsclosed afterwards, also on failure.Verified: mock tests (
tests/test_xrd_jog.py: sweep targets and velocities, no-travel case, restore on a detector fault). Not run on the beamline.