Skip to content

Take radiograph - #86

Merged
Anthony Sligar (sligara7) merged 5 commits into
NSLS2:mainfrom
sligara7:take_radiograph
Sep 11, 2026
Merged

Anthony Sligar (sligara7) merged 5 commits into
NSLS2:mainfrom
sligara7:take_radiograph

Conversation

@sligara7

Copy link
Copy Markdown
Contributor

Created a take_radiograph.py and as associated test.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_radiograph and its mock integration test.
  • Corrected flyscan plan metadata.
  • Updated the pinned ophyd-async revision.
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.

Comment thread src/hextools/tomography/take_radiograph.py
Comment thread tests/tomography/test_take_radiograph.py
Copilot AI review requested due to automatic review settings September 9, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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, _body exits before reaching unstage_all and close_run; finalize_wrapper only runs _cleanup, so the RunEngine is left with an open run and the detectors remain staged. Put detector unstage and run closure in a try/finally inside 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

  • arcs is not the term used for the arguments passed to Shutter.set; this comment appears to contain a typo and should say args.
        # 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

@sligara7
Anthony Sligar (sligara7) merged commit 40cf752 into NSLS2:main Sep 11, 2026
5 checks passed
@sligara7
Anthony Sligar (sligara7) deleted the take_radiograph branch September 11, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants