accelmo.fitting.config

Configuration shared by every fitter: the lattice range and the output settings.

class accelmo.fitting.config.SequenceConfig(magnet_range='$start/$end', bad_bpms=None)[source]

Bases: object

Configuration for the sequence segment used during optimisation.

The fields define the magnet range to expose to MAD-NG and any BPMs that should be ignored. Where measurement data starts (the BPM each recorded turn begins at) is a property of the measurement, not the sequence, so it lives on MeasurementDetails.

Parameters:
  • magnet_range (str)

  • bad_bpms (list[str] | None)

magnet_range: str = '$start/$end'
bad_bpms: list[str] | None = None
class accelmo.fitting.config.OutputConfig(write_run_log=True, include_uncertainty=True, run_log_root=<factory>, run_metadata=dict(), mad_logfile=None, python_logfile=None)[source]

Bases: object

Output and logging behaviour for optimisation runs.

Variables:
  • write_run_log (bool) – Whether to write a run log (see accelmo.runlog).

  • include_uncertainty (bool) – Whether to compute uncertainties. Disabling this skips worker-side Hessian estimation for faster execution.

  • run_log_root (Path) – Directory under which each fit writes its run log.

  • run_metadata (dict[str, Any]) – Free-form, JSON-serialisable description stored with the run log, e.g. what is needed to rebuild the model for replaying it.

  • mad_logfile (Path | None) – Optional MAD log file path.

  • python_logfile (Path | None) – Optional Python worker log file path.

Parameters:
  • write_run_log (bool)

  • include_uncertainty (bool)

  • run_log_root (Path)

  • run_metadata (dict[str, Any])

  • mad_logfile (Path | None)

  • python_logfile (Path | None)

write_run_log: bool = True
include_uncertainty: bool = True
run_log_root: Path
run_metadata: dict[str, Any]
mad_logfile: Path | None = None
python_logfile: Path | None = None