accelmo.machine.accelerators.sps

SPS-specific accelerator implementation with generic optimisation targets.

class accelmo.machine.accelerators.sps.SPS(sequence_file, kinetic_energy=450.0, bpm_pattern='^BP[HV]%.', errors=None, misalignments=None, optimise_energy=False, custom_knobs_to_optimise=None, backend='madng')[source]

Bases: Accelerator

Super Proton Synchrotron accelerator configuration.

This class intentionally exposes only generic optimisation categories, without LHC-specific options (bends, correctors, quadrupole displacements).

Parameters:
  • sequence_file (Path | str)

  • kinetic_energy (float)

  • bpm_pattern (str)

  • errors (Mapping[str, Iterable[str]] | None)

  • misalignments (Mapping[str, Iterable[str]] | None)

  • optimise_energy (bool)

  • custom_knobs_to_optimise (list[str] | None)

  • backend (str)

PATTERN_QUADRUPOLE = '^Q[FD]A?%.'
PATTERN_SEXTUPOLE = '^LS[FD]A?%.'
BPM_PATTERN = '^BP[HV]%.'
FAMILIES = {'quad': MagnetFamily(patterns={'quadrupole': '^Q[FD]A?%.'}, errors=frozenset({'k1'}), misalignments=frozenset(), nonzero_attr='k1', attr_patterns={}), 'sextupole': MagnetFamily(patterns={'sextupole': '^LS[FD]A?%.'}, errors=frozenset({'k2'}), misalignments=frozenset(), nonzero_attr='k2', attr_patterns={})}
copy_with(**overrides)[source]

Return a new SPS instance with selected parameters overridden.

Return type:

SPS

property seq_name: str

Return the sequence name for SPS.

property ac_dipole_name: str

Return the simulated SPS AC-dipole location.

omc3 installs the horizontal exciter at ZKHA.21991 and the vertical one at ZKV.21993, 1.5 m downstream with no BPM between. The marker machinery supports one exciter location, so both planes are driven at ZKHA.21991.

get_perturbation_families()[source]

Return perturbation-family metadata for SPS main families.

Return type:

dict[str, dict[str, str | float | dict]]

static infer_monitor_plane(bpm_name)[source]

Infer measurement plane from SPS BPM family name.

Return type:

str

Parameters:

bpm_name (str)

property tune_variables: tuple[str, str]

Return SPS tune variable names.

property tune_integers: tuple[int, int]

Return SPS integer tunes.