Repository navigation
Sample environment: Lake Shore 336 cryostat - #16
Merged
Anthony Sligar (sligara7) merged 2 commits intoOct 26, 2026
Merged
Anthony Sligar (sligara7) merged 2 commits into
Anthony Sligar (sligara7) merged 2 commits into
Conversation
Port of pdf-profile-collection 101-Lakeshore336Cryostat.py (Cheng-Hung Lin, 129831d) with its names, PID tables and 5-550 K limits. PV suffixes and enum states pinned to the live lakeshore336 IOC on xf28id1-inst-ioc1 (records.dbl, 2026-10-26). Out-Sts is read-only; the range enum gains RANGE 4/5 as the IOC has them. Assisted-by: copilot:claude-opus-5-5
There was a problem hiding this comment.
🟡 Changes recommended
PID setup, timeout calculation and enforcement, and measured-temperature recording have unresolved correctness issues.
4 open issues
What changed in this PR
Adds an ophyd-async Lake Shore 336 cryostat device and integrates it into the collection profile, preserving the previous profile’s PID tables, temperature limits, and loop/input mappings.
Changes:
- Implements temperature inputs, control loops, direction-dependent PID selection, and settling logic.
- Exposes
lakeand thecryostat = lake.out1alias. - Adds mock tests for IOC mappings, enums, movement, limits, and timeouts.
| File | Description |
|---|---|
tests/test_lakeshore336.py |
Adds mocked device and movement tests. |
src/pdftools/profiles/collection.py |
Instantiates the controller and exposes the cryostat alias. |
src/pdftools/lakeshore336.py |
Implements the controller’s signals and temperature-move logic. |
Review effort: Balanced
Zero-ramp fallback converted to K/min (0.015 K/s), so its timeout is not 60 times too long. PIDs are chosen in move() from the measured start, so set(T, timeout=...) sets them too. The deadline covers the PID and setpoint writes as well as the settle. The loop's measured temperature is a hinted reading, so scans record it. Each observed failing first in a new test. Assisted-by: copilot:claude-opus-5-5
Anthony Sligar (sligara7)
merged commit Oct 26, 2026
a7f3f8d
into
NSLS2:pdf-profile-conversion
4 checks passed
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.

Adds
pdftools.lakeshore336andlake/cryostat = lake.out1to the profile. It is a port of Cheng-Hung's ophyd-async device in pdf-profile-collectionstartup/101-Lakeshore336Cryostat.py(129831d), keeping its names, PID tables, 5–550 K limits and the loop/input wiring (out1 reads input C, tolerance 1 K, settle 120 s).Checked against the live
lakeshore336IOC on xf28id1-inst-ioc1 (XF:28ID1-ES{LS336:1}, itsrecords.dblanddb/files, 2026-10-26): every suffix the device uses is served, and the enum classes equal the records' states. Changes from the profile file:loop_in_rb(Out-Sts, an mbbi) is read-only.Lakeshore336RangeSelectgains RANGE 4/5, as the record has them.check_movesays why it refuses.Fixed after Copilot's review (77d77e1): the zero-ramp fallback is in K/min; PIDs are set in
move(), so a move with its own timeout sets them too; the deadline covers the PID and setpoint writes; the loop's measured temperature is a hinted reading, so scans record it. Still as in the profile:move_timeoutis unused;default_loop,move_and_continueandt_listare left for the Lakeshore temperature series PR.Verified: mock tests (PV names pinned to the IOC's record list, enum states, PID choice per direction, settle, limits, timeout); 100 pass. Not run on the beamline.