
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.
My measurement stack since 2024, behind the magnetoresistance and exchange-bias work, and the base that I2AS generalises.
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
RampableVIinterface that raises aCryoSoftSafetyError. - Generated the PyQt6 and pyqtgraph GUI by introspection of methods marked
monitoredorcontrol, using Python'sinspectandtyping, 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.