Observed since 20 Oct, 17:59 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Python project for inverse modeling of accelerator lattices
accinv - Python project for inverse modeling of accelerator lattices
Note: This project is in proof-of-concept stage and therefore lacks more advanced features of some of the implemented methods.
In its current state, the package provides functionality for inverse modeling of linear optics
via fitting of orbit response matrix (ORM) data, typically referred to as linear optics
from closed orbits. It supports cpymad as a backend.
The main class is accinv.loco.Loco which requires one of the models from accinv.model, as well as
a method for computing Jacobians, as an argument.
Two methods for Jacobian computation are available.
AnalyticalJacobianMethod: This method uses an analytical formula to compute the Jacobian of the ORM
with respect to quadrupole gradient errors and BPM and steerer gain errors. The data for the
analytical formula is obtained from a single Twiss call for the current lattice configuration.NumericalMJacobianMethod: This method uses a finite difference approximation scheme to compute the Jacobian of
the ORM with respect to the quadrupole gradient errors. Thus, the number of ORMs that will be computed
is proportional to the number of quadrupoles.The inverse modeling process can be started by creating a Loco object and calling its run method:
from accinv.jacobian import AnalyticalJacobianMethod
from accinv.loco import Loco, OrmMeasurement
from accinv.model import Madx
model = Madx(path='path/to/script.madx')
loco = Loco(
model_and_jacobian_method=(model, AnalyticalJacobianMethod),
quadrupoles=[...], # names of quadrupoles
hbpms=[...], # names of horizontal BPMs
hsteerers=[...], # names of horizontal steerers
vbpms=[...], # names of vertical BPMs
vsteerers=[...], # names of vertical steerers
orm_measurement=OrmMeasurement(
orm=np.load('path/to/measured_orm.npy'),
uncertainty=np.load('path/to/orm_uncertainty.npy'),
),
)
result = loco.run()
Please consider the documentation of the
Loco class
for more details.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.0.post1 | 5 Dec 2022 | 11 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitLab
| Contributor | Contributions |
|---|---|
| Dominik1123 | 130 |
Default-branch author identities; GitLab commit counts exclude merge commits.
Public sponsor counts have not been collected. These signals belong to the repository owner.
gitlab · 3 observations shown. Missing days are unknown.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-22 | 1 | 2026-10-22T19:04:54.1266053Z |
| 2026-10-21 | 1 | 2026-10-21T19:04:30.5206576Z |
| 2026-10-20 | 1 | 2026-10-20T19:04:11.9100540Z |
Observed since 20 Oct, 17:59 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c87faac83ccd898027a46b2211545b8203af038b69a7a714fa32b5312fdb7ff1