Skip to content

Sample environment: Lake Shore 336 cryostat - #16

Merged
Anthony Sligar (sligara7) merged 2 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-06b-lakeshore336
Oct 26, 2026
Merged

Anthony Sligar (sligara7) merged 2 commits into
NSLS2:pdf-profile-conversionfrom
sligara7:pdf-conv-06b-lakeshore336

Conversation

@sligara7

@sligara7 Anthony Sligar (sligara7) commented Oct 26, 2026 •

Copy link
Copy Markdown

Adds pdftools.lakeshore336 and lake / cryostat = lake.out1 to the profile. It is a port of Cheng-Hung's ophyd-async device in pdf-profile-collection startup/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 lakeshore336 IOC on xf28id1-inst-ioc1 (XF:28ID1-ES{LS336:1}, its records.dbl and db/ 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.
  • Lakeshore336RangeSelect gains RANGE 4/5, as the record has them.
  • check_move says 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_timeout is unused; default_loop, move_and_continue and t_list are 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.

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
Copilot AI balanced review requested due to automatic review settings October 26, 2026 17:04

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

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 lake and the cryostat = lake.out1 alias.
  • 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

Comment thread src/pdftools/lakeshore336.py Resolved
Comment thread src/pdftools/lakeshore336.py Resolved
Comment thread src/pdftools/lakeshore336.py Resolved
Comment thread src/pdftools/lakeshore336.py Resolved
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
Copilot AI balanced review requested due to automatic review settings October 26, 2026 17:15

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 physical heater-control integration needs final beamline review because behavioral validation is mock-only.

No open issues 🎉

4 resolved since last review

Review effort: Balanced

@sligara7
Anthony Sligar (sligara7) merged commit a7f3f8d into NSLS2:pdf-profile-conversion Oct 26, 2026
4 checks passed
@sligara7
Anthony Sligar (sligara7) deleted the pdf-conv-06b-lakeshore336 branch October 26, 2026 17:28
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