Repository navigation
XRD: start the Perkin Elmer's Acquire on its readback - #15
Merged
Anthony Sligar (sligara7) merged 1 commit intoOct 26, 2026
Merged
Anthony Sligar (sligara7) merged 1 commit into
Anthony Sligar (sligara7) merged 1 commit into
Conversation
ensure_cont_acq_exposure started the busy Acquire record with abs_set(wait=False). With the readback lagging, ContAcqDetector.prepare raised 'Driver must be acquiring in continuous mode'; with it prompt, prepare(wait=True) waited on the Acquire put (group None), which completes only when acquisition stops, and timed out. It now waits for the readback with set_and_wait_for_value(wait_for_set_completion=False), as hextools 44c475d does. Both new tests observed failing first. Assisted-by: copilot:claude-opus-5-5
There was a problem hiding this comment.
🟢 Approval recommended
The focused synchronization fix addresses both reported failures, with targeted regression coverage and no blocking issues identified.
No open issues 🎉
What changed in this PR
This PR updates XRD acquisition startup to wait for the Perkin Elmer detector’s Acquire readback rather than its busy-record put completion, addressing restart races and scan preparation timeouts.
Changes:
- Uses readback-based synchronization without waiting for Acquire’s put to complete.
- Adds regression tests modeling delayed readback and a pending Acquire put to cover both reported failures.
| File | Description |
|---|---|
tests/test_xrd.py |
Adds busy-record simulation and regression tests for acquisition startup and scans after restart. |
src/pdftools/xrd.py |
Waits for the Acquire readback before continuing, without joining the pending put to a RunEngine status group. |
Review effort: Balanced
Anthony Sligar (sligara7)
merged commit Oct 26, 2026
f7f9514
into
NSLS2:pdf-profile-conversion
4 checks passed
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.
ensure_cont_acq_exposurestarted Acquire withabs_set(wait=False). Acquire is a busy record: its put completes only when acquisition stops. After a restart (new exposure time):ContAcqDetector.prepareraisesDriver must be acquiring in continuous mode;prepare(wait=True)(inxrd_scanandxrd_jog) waits on the Acquire put, which is in the same group (None), and times out.It now waits for the readback with
set_and_wait_for_value(..., wait_for_set_completion=False), as hextools did in NSLS2/hextools#110 (44c475d) after #10 was ported from that PR's earlier head.Verified: mock tests. Two new tests model Acquire as a busy record and were observed failing first, one for each failure above; 78 pass. Not run on the beamline.