step.calibration.store

YAML-backed calibration store.

Persists arbitrary calibration data to racoon.calibration.yml alongside the C++ CalibrationStore (which owns the ir-calibration section).

Each section/set pair maps to a flat dict of values:

root:
  range-finder:
    first_pipe:
      t_enter: 1200.0
      t_exit: 800.0
  drum-collector:
    default:
      blocked: 3200.0
      pocket: 900.0

Attributes

CALIBRATION_FILE

Classes

CalibrationStore

Read and write named calibration sections in the calibration YAML.

Module Contents

step.calibration.store.CALIBRATION_FILE = 'racoon.calibration.yml'
class step.calibration.store.CalibrationStore(path: pathlib.Path | None = None)

Read and write named calibration sections in the calibration YAML.

load(section: str, set_name: str = 'default') dict | None

Load a calibration dict, or None if nothing is stored.

store(section: str, data: dict, set_name: str = 'default') None

Persist a calibration dict (merges with existing file).

has_data(section: str, set_name: str = 'default') bool

Check whether calibration data exists for the given section/set.