A line drawing of a cryostat, its outer vessel enclosing an inner chamber with a sample at the centre of a magnet bore, marked in maroon. Circuit-board traces run from the cryostat to five stacked instrument icons on the right: a computer display, a gauge, an oscilloscope, a control unit and a meter.

Instrument software · 2024–present

CryoSoft

Cryogenic measurements that run for 30 to 40 hours with nobody watching, inside safety limits the software enforces itself.

The short version

The lab's LabVIEW measurement code was a flat sequence of hardcoded commands: instrument parameters were scattered through it, swapping an instrument meant hours of rewriting, and the metadata needed to trace a measurement artefact was not saved. Overnight runs of 30 to 40 hours had no software safety net, so nothing would have stopped an unsafe magnet or temperature transition.

Role
Solo developer
Period
2024–present
PythonPyQt6pyqtgraphPyVISAPyMeasureh5pynumpyruamel.yamlpytestpytest-qtmypyHDF5State machines

View the repository →

My measurement stack since 2024, behind the magnetoresistance and exchange-bias work, and the base that I2AS generalises.

A line drawing in light grey on a dark ground: a cryostat, its outer vessel enclosing an inner chamber with a sample at the centre of a magnet bore, marked in maroon. Circuit-board traces run from the cryostat to five stacked instrument icons on the right: a computer display, a gauge, an oscilloscope, a control unit and a meter. One program between the cryostat and every instrument around it.

How

  • Split the stack into six layers: raw drivers, typed virtual instruments, a YAML station registry (ruamel.yaml), an orchestrator, measurement procedures and the GUI, each depending only on the one below, so an instrument swap is a config edit. Every real driver (Oxford Mercury iPS, ITC 503, ILM 200, Lakeshore 335, Keithley 6221 and 2182A, over PyVISA and PyMeasure) has a simulated twin for offline testing.
  • Put safety in a cryostat state machine ticked by one Qt QTimer. Per-tick checks force EMERGENCY on low helium or a stale sensor reading, and ramp targets are validated through a RampableVI interface that raises a CryoSoftSafetyError.
  • Generated the PyQt6 and pyqtgraph GUI by introspection of methods marked monitored or control, using Python's inspect and typing, so a new instrument's controls appear without GUI code.
  • Wrote one HDF5 file per run with h5py and numpy: metadata, timestamped data points and a full instrument snapshot per sweep point, enough for root-cause analysis of an artefact. Arrays trim cleanly on abort.
  • Kept it tested and typed with pytest, pytest-qt and mypy.

Recent work added a configuration editor and session management, and an agent harness for commissioning, new drivers and fault finding. I am extending it so that software agents can work with the system over MCP.