rigs#
Machine-level store of canonical hardware.yaml rig configurations.
A hardware.yaml is rig-specific – it pins COM ports, camera ids, device
indices, and Micro-Manager .cfg paths to one physical computer. Rather
than hand-copying the right file into every new experiment, each machine keeps
a small store of named canonical configs in its OS-native config directory
(via platformdirs). mesofield init copies a chosen rig into the new
experiment so the experiment folder stays self-contained.
- mesofield.scaffold.rigs.rigs_dir()[source]#
Return (creating if needed) the directory holding canonical rig files.
- Return type:
- mesofield.scaffold.rigs.rig_path(name)[source]#
Return the path a rig named
nameresolves to (.yaml).
- mesofield.scaffold.rigs.add_rig(name, source, *, force=False)[source]#
Copy an existing
hardware.yamlinto the store undername.The source is parsed with
yaml.safe_load()first so a malformed file is rejected before it lands in the store.
- mesofield.scaffold.rigs.new_rig(name, *, force=False)[source]#
Write a blank fill-out hardware template into the store under
name.
- mesofield.scaffold.rigs.save_rig(name, doc, *, force=False)[source]#
Serialize a builder-assembled mapping into the store under
name.The single write path used by the GUI hardware builder. The mapping is dumped to YAML and re-parsed before it lands in the store, so a malformed document can never be saved as a canonical rig.
- mesofield.scaffold.rigs.remove_rig(name)[source]#
Delete a rig from the store.
- Parameters:
name (str)
- Return type:
None
- mesofield.scaffold.rigs.rig_devices(name)[source]#
Return
(device_name, device_type)pairs declared by rigname.Mirrors how
HardwareManagerreads the YAML: every top-level mapping (other than scalar config keys) is a device, and acameras:list expands to one entry per camera.