Skip to content

Temperature series with the Lake Shore cryostat; default_loop, t_list - #17

Open
Anthony Sligar (sligara7) wants to merge 1 commit into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-05e-lakeshore-series
Open

Anthony Sligar (sligara7) wants to merge 1 commit into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-05e-lakeshore-series

Conversation

@sligara7

Copy link
Copy Markdown

Step 5e of the PDF profile conversion: temperature series with the Lake Shore 336 cryostat (#16).

  • xrd_temperature_series takes cryostat (lake.out1) as well as eurotherm.loop1. ramp_rate sets the Lake Shore's ramp (K/min). The temperature in each start document comes from locate, and now also records settled.
  • New continue_if_unsettled=False: when True, a move that times out warns, the images are still taken, and settled: False is recorded. Any other failure (out of range, disconnect) still stops the plan. This matches how Cryostat_2_Detector_scan2.py uses move_and_continue.
  • New pdftools.temperature, ported from 101-Lakeshore336Cryostat.py (129831d) with the same names, and loaded into the session:
    • default_loop(loop): holds the current temperature, sets PID/ramp/input/heater settings, then heater range 3.
    • t_list(tlist, controller=None): visits each temperature and goes on past unsettled ones (defaults to cryostat).
    • move_and_continue(device, target).

Verified: mock tests (12 new or changed, 107 total) against the mocked Lake Shore/Eurotherm, Perkin Elmer and shutter. Not run on the beamline.

…, move_and_continue

xrd_temperature_series takes a Lake Shore loop (cryostat) as well as a Eurotherm loop, reads the temperature with locate, and records whether each move settled. continue_if_unsettled=True keeps going past a move that timed out, as Cheng-Hung's move_and_continue does. default_loop, t_list and move_and_continue are ported from pdf-profile-collection 101-Lakeshore336Cryostat.py (129831d) into pdftools.temperature.

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

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

Timeout handling can suppress controller-write failures and allow acquisition before the requested setpoint has been applied.

1 open issue
What changed in this PR

Extends PDF temperature-series acquisition to the Lake Shore 336 cryostat and adds session helpers for controller setup and temperature sequences.

Changes:

  • Supports Lake Shore ramp rates and records temperature readback and settling status in run metadata.
  • Adds optional continuation after unsettled moves and ports temperature helper plans.
  • Adds mock coverage for cryostat acquisition, helper setup, and move failures.
File Description
tests/​test_xrd_temperature.py Tests cryostat acquisition, settling metadata, and failure handling.
tests/​test_temperature.py Tests controller setup and temperature-sequence helpers.
tests/​conftest.py Adds a fast-settling mock Lake Shore fixture.
src/​pdftools/​xrd.py Adds cryostat support and optional unsettled acquisition.
src/​pdftools/​temperature.py Introduces setup, move-continuation, and temperature-list plans.
src/​pdftools/​profiles/​collection.py Exposes temperature helpers in the collection session.

Review effort: Balanced

Comment on lines +42 to +43
if not isinstance(e.__cause__, TimeoutError):
raise
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