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.
Python 3.10 or newer is recommended.
git clone https://github.com/elafmusa/pyLOCO.git
cd pyLOCO
python3 -m pip install -e .For the graphical interface:
python3 -m pip install -e ".[gui]"
pyloco-guiIf 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.pyFor a real measured-machine application, use the PETRA III coupling example:
python3 Examples/PETRAIII/example_measured_coupling.pyIts settings are in:
Examples/PETRAIII/pyloco_config_coupling.yaml
Install pytest and run:
python3 -m pip install pytest
python3 -m pytest- Examples and which one to choose
- Measured-machine configuration
- PETRA III measurement example
- PETRA III GUI files
- Testing guide
Questions or suggestions: elaf.musa@desy.de