accelmo.tracking.dispatch.setup¶
Worker planning: the config of every worker for a set of BPM ranges and files.
LHC and PSB BPMs measure both planes, so workers follow the data alone: a file
kicked in one plane gives single-plane workers. On a machine with single-plane
BPMs (SPS BPH/BPV) each worker additionally observes only the BPMs that
see its plane, ranges are planned per plane, and dual-plane data is split into
separate x and y workers.
- class accelmo.tracking.dispatch.setup.KickPlane(*values)[source]¶
Bases:
StrEnumKick-plane options for worker routing and payload selection.
- X = 'x'¶
- Y = 'y'¶
- XY = 'xy'¶
- class accelmo.tracking.dispatch.setup.TrackingWorkerConfig(accelerator, magnet_range, machine_state=None, b2_errors=None, bad_bpms=None, debug=False, mad_logfile=None, python_logfile=None, *, geometry, file_idx, bpm_names, kick_plane=KickPlane.XY)[source]¶
Bases:
WorkerConfigOne tracking worker: model options, the segment it tracks, its file and observed BPMs.
- Parameters:
accelerator (Accelerator)
magnet_range (str)
machine_state (MachineState | None)
b2_errors (Path | None)
bad_bpms (list[str] | None)
debug (bool)
mad_logfile (Path | None)
python_logfile (Path | None)
geometry (TrackGeometry)
file_idx (int)
bpm_names (list[str])
kick_plane (KickPlane)
- geometry: TrackGeometry¶
- file_idx: int¶
- bpm_names: list[str]¶
- accelmo.tracking.dispatch.setup.build_range_specs(accelerator, ranges)[source]¶
The logical worker ranges of
ranges.plan.- Return type:
list[WorkerRangeSpec]- Parameters:
accelerator (Accelerator)
ranges (BpmRanges)
- accelmo.tracking.dispatch.setup.plan_workers(base, ranges, file_idx, kick_plane, available_bpms)[source]¶
Every worker one turn batch of file
file_idxfans out to.baseholds the file’s model options;kick_planeis the plane the file excites.- Return type:
list[TrackingWorkerConfig]- Parameters:
base (WorkerConfig)
ranges (BpmRanges)
file_idx (int)
kick_plane (str | KickPlane)
available_bpms (set[str])
- accelmo.tracking.dispatch.setup.range_workers(base, ranges, range_spec, file_idx, kick_plane, available_bpms)[source]¶
The worker(s) of one range and measurement file: one per fitted plane.
- Return type:
list[TrackingWorkerConfig]- Parameters:
base (WorkerConfig)
ranges (BpmRanges)
range_spec (WorkerRangeSpec)
file_idx (int)
kick_plane (str | KickPlane)
available_bpms (set[str])