Repository navigation
Temperature series with the Lake Shore cryostat; default_loop, t_list - #17
Open
Anthony Sligar (sligara7) wants to merge 1 commit into
Open
Anthony Sligar (sligara7) wants to merge 1 commit into
Anthony Sligar (sligara7) wants to merge 1 commit into
Conversation
…, 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
There was a problem hiding this comment.
🟡 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 |
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.

Step 5e of the PDF profile conversion: temperature series with the Lake Shore 336 cryostat (#16).
xrd_temperature_seriestakescryostat(lake.out1) as well aseurotherm.loop1.ramp_ratesets the Lake Shore'sramp(K/min). The temperature in each start document comes fromlocate, and now also recordssettled.continue_if_unsettled=False: whenTrue, a move that times out warns, the images are still taken, andsettled: Falseis recorded. Any other failure (out of range, disconnect) still stops the plan. This matches howCryostat_2_Detector_scan2.pyusesmove_and_continue.pdftools.temperature, ported from101-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 tocryostat).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.