Take radiograph - #86
Merged
Merged
Conversation
Bluesky port of hex-acq-pyepics techniques/tomography/kinetix/take_radiograph.py. Bursts (frames_per_burst x num_bursts, wait between) per current operating practice; internal trigger via prepare(TriggerInfo) with deadtime enforcing the period-larger-than-exposure discipline; generic over StandardDetector; photon shutter under a finalizer; file placement owned by the path provider.
Anthony Sligar (sligara7)
requested review from
Jakub Wlodek (jwlodek)
and
a lite review from Copilot
and removed request for
Copilot
September 9, 2026 18:30
Copilot started reviewing on behalf of
Anthony Sligar (sligara7)
September 9, 2026 18:30
View session
Copilot started reviewing on behalf of
Anthony Sligar (sligara7)
September 9, 2026 18:30
View session
…ubscriber like test_alignment
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Exception-safe detector teardown and test indentation corrections are needed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a burst-mode radiograph acquisition plan with shutter and HDF detector support, tests, metadata correction, and a dependency lock update.
Changes:
- Added
take_radiographand its mock integration test. - Corrected flyscan plan metadata.
- Updated the pinned
ophyd-asyncrevision.
File summaries
| File | Summary |
|---|---|
tests/tomography/test_take_radiograph.py |
Adds plan behavior coverage; continuation indentation needs Ruff formatting. |
src/hextools/tomography/take_radiograph.py |
Adds the acquisition plan; exception paths need detector unstaging and run finalization. |
src/hextools/tomography/flyscans.py |
Corrects tomography flyscan metadata. |
pixi.lock |
Updates the dependency lock entry. |
Review details
- Files reviewed: 3/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot started reviewing on behalf of
Anthony Sligar (sligara7)
September 9, 2026 18:34
View session
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Error paths can leave the run open and detectors staged.
Review details
Suppressed comments (2)
src/hextools/tomography/take_radiograph.py:152
- If acquisition or sleep raises here,
_bodyexits before reachingunstage_allandclose_run;finalize_wrapperonly runs_cleanup, so the RunEngine is left with an open run and the detectors remain staged. Put detector unstage and run closure in atry/finallyinside the body (or use a run/staging wrapper) so they execute on errors and interrupts as well.
yield from bps.unstage_all(*detectors)
yield from bps.close_run()
tests/tomography/test_take_radiograph.py:30
arcsis not the term used for the arguments passed toShutter.set; this comment appears to contain a typo and should sayargs.
# the only two arcs Shutter.set awaits: a command put flips the status readback
- Files reviewed: 3/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
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.
Created a take_radiograph.py and as associated test.