Skip to content

Repository files navigation

pyLOCO

pyLOCO is a Python implementation of the Linear Optics from Closed Orbits (LOCO) for fitting accelerator models to measured or error-simulated data.

LOCO reference: J. Safranek, “Experimental determination of storage ring optics using orbit response measurements,” NIM A 388 (1997), 27–36, doi:10.1016/S0168-9002(97)00309-4.

Install

Python 3.10 or newer is recommended.

git clone https://github.com/elafmusa/pyLOCO.git
cd pyLOCO
python3 -m pip install -e .

GUI

For the graphical interface:

python3 -m pip install -e ".[gui]"
pyloco-gui

Recommended examples

If you are new to pyLOCO, start with the simple single-quadrupole example:

python3 Examples/reconstruct_quadrupoles_errors_examples/reconstruct_one_quad_errors/example_one_quad_error.py

For a real measured-machine application, use the PETRA III coupling example:

python3 Examples/PETRAIII/example_measured_coupling.py

Its settings are in:

Examples/PETRAIII/pyloco_config_coupling.yaml

Tests

Install pytest and run:

python3 -m pip install pytest
python3 -m pytest

More information

Questions or suggestions: elaf.musa@desy.de

About

Python package for the Linear Optics from Closed Orbits (LOCO) algorithm used for parameters fittings and accelerator lattice tuning

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages