accelmo.tracking.config.helpers

Helper functions for creating fitter configurations.

This module provides convenience functions to reduce duplication when creating fitter configuration objects for common use cases.

accelmo.tracking.config.helpers.single_measurement_config(measurement_file, machine_deltap=0.0, machine_state=None, first_bpm=None, b2_errors=None)[source]

Build a single-file MeasurementConfig.

Convenience for the common one-measurement case. Multi-file runs build the {path: MeasurementDetails(...)} mapping directly. The bunch structure is read from the parquet’s bunch_number column, so it is not configured here. first_bpm names the BPM the recorded turns begin at; leave it None to use the file’s own first recorded BPM. b2_errors optionally applies an LHC dipole b2 error table during optimisation (requires machine_state, holding the tune knobs).

Return type:

MeasurementConfig

Parameters:
  • measurement_file (Path)

  • machine_deltap (float)

  • machine_state (Mapping[str, float] | Path | None)

  • first_bpm (str | None)

  • b2_errors (Path | None)