Skip to content

Profile conversion 5c: xrd_temperature_series - #13

Merged
Anthony Sligar (sligara7) merged 2 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-05c-temperature
Oct 23, 2026
Merged

Anthony Sligar (sligara7) merged 2 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-05c-temperature

Conversation

@sligara7

Copy link
Copy Markdown

Replaces the old pbar_set_temp + count with xrd_temperature_series in pdftools.xrd, loaded into the profile session.

For each setpoint it moves the controller (e.g. eurotherm.loop1; the move waits until the reading has settled within the loop's tolerance/settle_time), then counts as xrd_count does. The shutter is closed while the temperature changes. Each run's metadata records the setpoint and the reading before counting. An optional ramp_rate is set once at the start. The Lakeshore version (cryostat_set_temp) follows once the Lakeshore device lands.

Verified: mock tests (tests/test_xrd_temperature.py: setpoint order, shutter closed during moves, metadata, ramp rate, shutter closed and nothing counted when the temperature never settles). Not run on the beamline.

Replaces pdf-profile-collection pbar_set_temp followed by a count: moving the Eurotherm loop already waits until the reading settles, so the plan steps through the setpoints and counts at each, with the shutter closed while the temperature changes.

Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 23, 2026 23:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Initial shutter closure and fresh temperature metadata for each repeated run need correction.

2 open issues
What changed in this PR

Adds xrd_temperature_series to the XRD plans and collection profile, combining temperature settling with repeated acquisitions.

Changes:

  • Adds ordered temperature moves, optional ramp-rate configuration, shutter handling, and temperature metadata.
  • Exposes the plan in the collection session.
  • Adds mock tests for acquisition order, metadata, ramp rate, and failure to settle.
File Description
tests/​test_xrd_temperature.py Adds mock coverage for the temperature-series plan.
src/​pdftools/​xrd.py Implements temperature-controlled XRD acquisitions.
src/​pdftools/​profiles/​collection.py Imports the new plan into the collection session.

Review effort: Balanced

Comment thread src/pdftools/xrd.py
Comment thread src/pdftools/xrd.py Outdated
…temperature per run

An already-open shutter stayed open through the first temperature change, and every run at one temperature reported the first run's reading. Both found by Copilot review on NSLS2#13; regression tests added.

Assisted-by: copilot:claude-opus-5-5
Copilot AI balanced review requested due to automatic review settings October 23, 2026 23:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The temperature-and-shutter hardware workflow warrants final human review because it has not been validated on the beamline.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@sligara7
Anthony Sligar (sligara7) merged commit 97eb622 into NSLS2:pdf-profile-conversion Oct 23, 2026
4 checks passed
@sligara7
Anthony Sligar (sligara7) deleted the pdf-conv-05c-temperature branch October 23, 2026 23:29
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