API Reference¶
The reference covers every module of the accelmo package. Measurement and campaign
workflows are maintained in separate repositories.
Primary Entry Points¶
Abstract base class for accelerator definitions. |
|
Large Hadron Collider accelerator configuration. |
|
Proton Synchrotron Booster accelerator configuration. |
|
Super Proton Synchrotron accelerator configuration. |
|
FCC-ee accelerator configuration: one k1 knob per arch/IR quadrupole. |
|
Configuration for gradient descent optimiser algorithms. |
|
How the worker processes run: how many, their log level and BLAS threads. |
|
Which tracking data the fit uses and how its turns are batched. |
|
What a tracking fit fits besides the magnet knobs, and every prior width. |
|
Fit magnet strengths from arc-by-arc BPM ranges. |
|
Fit magnet strengths from AC-dipole data, tracked from the exciter markers. |
|
Fit magnet strengths from kicker-excited turn-by-turn data. |
|
Fit AC-dipole data tracked forward over many turns through the model AC kickers. |
|
Optional inputs shared by every tracking fitter. |
|
The tracking LM solver: stops after several stalled steps, since early steps can be tiny. |
|
Maps each measurement file to its |
|
Configuration for the sequence segment used during optimisation. |
|
Output and logging behaviour for optimisation runs. |
|
Fitted knobs, their 1-sigma uncertainties (by knob name) and how the fit ended. |
|
Fit magnet knobs to absolute or reference-subtracted closed orbits. |
|
Measurements evaluated in one process at one machine state. |
|
|
|
One absolute closed-twiss series per measured momentum |
|
|
Configuration for a Levenberg-Marquardt Gauss-Newton solve. |
Accelerators And Configuration¶
The accelerator and its MAD-NG model: machine definitions and the MAD-NG interfaces. |
|
Accelerator definitions for the supported machines (LHC, PSB, SPS, FCC). |
|
Base accelerator class defining the interface for all accelerators. |
|
LHC-specific accelerator implementation. |
|
PSB-specific accelerator implementation. |
|
SPS-specific accelerator implementation with generic optimisation targets. |
|
FCC-ee-specific accelerator implementation (LCC optics). |
|
Pure utilities for grouping accelerator magnets and their knob values. |
|
CLI spelling and helpers for accelerator |
|
Element-name patterns: the accelerators write Lua patterns, other backends match them as regex. |
|
The machine state a model is put in: name/value pairs applied to the model's globals. |
|
Names of settable magnet strengths ( |
|
Settings of the gradient-descent optimiser, the worker processes and the tracking fit. |
Backends¶
The engine protocols are specified in Model backends.
Model backends: MAD-NG ( |
|
What the workers and the parent need from a model backend. |
|
MAD-NG backend: everything that imports |
|
The MAD-NG session of accelmo: |
|
MAD-NG tracking and closed-orbit engines (see |
|
MAD-NG side of the accelerator definitions: Lua run around knob creation, per-kind track methods. |
|
Read and assign machine-state globals (see |
|
Helpers for loading or generating MAD-NG tracking scripts. |
|
xtrack TPSA backend: everything that imports xtrack. |
|
xtrack TPSA tracking and closed-orbit engines (see |
|
The xsuite line of one accelerator: knobs as line variables, observed BPMs, machine state. |
Closed-Orbit Fitting (POCO)¶
POCO: Parametric Optimisation of Closed Orbits. |
|
Closed-orbit fitter: LOCO-style machine-state comparisons and measured closed twiss. |
|
Closed-orbit fitter that also fits BPM gains and corrector kick calibrations (see |
|
Levenberg-Marquardt base fitter of POCO and the measured-optics observables. |
|
Measure map for BPM gain and corrector kick calibration in closed-orbit fits. |
|
MAD-NG worker processes of the closed-orbit and closed-twiss fitters. |
|
Closed-orbit worker: absolute or reference-subtracted orbit series, and absolute closed-twiss series. |
|
Closed-twiss observables and their weighted least-squares blocks. |
|
Closed-orbit worker with BPM gain and corrector calibration parameters (see |
|
Fit bends and quads to closed orbit + phase, and hand back a closed-orbit reference. |
Tracking Fits¶
Tracking fits: magnet knobs from turn-by-turn BPM data by mini-batch gradient descent. |
|
Tracking fitters that recover magnet knob strengths from turn-by-turn data. |
|
The tracking Levenberg-Marquardt objective: knobs, BPM gains and optionally the particle starts. |
|
The running workers of one tracking fit. |
|
The BPM ranges a tracking fit tracks between. |
|
Measurement data loading and turn batching for the tracking optimisation. |
|
Particle tracking worker for multi-turn beam dynamics simulations. |
|
Turning the loaded data into tracking-worker payloads: range setup and turn planning. |
|
Worker payload construction. |
|
Worker planning: the config of every worker for a set of BPM ranges and files. |
|
Turn-batch planning for tracking workers. |
|
Stopping the training workers and folding their uncertainty parts into |
|
ACD sinusoid fits: single steps (IC or k free) and the joint fit with turn continuation. |
|
The mini-batch gradient-descent loop of the tracking fit, its schedule and checkpoints. |
|
The mini-batch gradient-descent loop of the tracking fit. |
|
Learning-rate schedulers used by optimisation fitters. |
|
Checkpoint persistence and knob-remapping for the optimisation loop. |
|
Configuration models and planning helpers for training fitters. |
|
Helper functions for creating fitter configurations. |
|
Configuration dataclasses for fitter initialization. |
|
Tracking-mode planning for arc-by-arc, kicker- and AC-dipole-excited runs. |
Optimisers And Numerical Helpers¶
Optimisation algorithms used by accelmo. |
|
Abstract optimiser interface and best-point tracking. |
|
Adam optimiser implementation used by the training loop. |
|
Limited-memory BFGS optimiser (no line search). |
|
Levenberg-Marquardt optimiser for Gauss-Newton systems. |
Analysis¶
Analysis utilities that inspect a fit without changing the optimisation. |
|
Detect degenerate (unconstrained) knob directions before optimising. |
Run Logs And Monitor¶
One call to set up logging in the main process of a script. |
|
A live terminal dashboard for a running fit; it knows nothing about machines or fitters. |
|
The live terminal dashboard of a gradient-descent fit. |
|
A log-scale line plot drawn with braille characters. |
|
Run logs: what a fit records while it runs, for live monitoring and later replay. |
|
Reading run logs, including those of fits that are still running. |
|
Writing a run log from inside a fit. |
|
Live monitor for fits: plots from run logs, with optics recomputed from the knobs. |
|
What the machine side supplies to the monitor. |
|
What a panel gets to draw from. |
|
Computing optics from logged knobs in the background, and keeping the results. |
|
Panels that work for any fit: they need only the run log, not the optics. |
|
The monitor web app: pick a stage and a step, see every panel for it. |