pylhc / omc3

Python 3 codes for beam optics measurements and corrections in circular particle accelerators
https://pylhc.github.io/omc3/
MIT License
14 stars 7 forks source link
accelerator-physics analysis cern frequency-analysis mad-x omc optics optics-measurements particle-accelerators plots python

3

Tests Code Climate coverage Code Climate maintainability (percentage) GitHub last commit GitHub release DOI

This is the python-tool package of the Optics Measurements and Corrections team (OMC) at CERN.

Most of the codes are generic and not limited to CERN accelerators, and the package can easily be used for your favorite circular accelerator. To see how to adapt this for your machine, see our documentation, Model section. To contribute, see our guidelines on the OMC website.

Documentation

Installing

Installation is easily done via pip:

pip install omc3

For development purposes, we recommend creating a new virtual environment and installing from VCS in editable mode with all extra dependencies (cern for packages only available in the CERN GPN, test for pytest and relevant plugins, and doc for packages needed to build documentation)

git clone https://github.com/pylhc/omc3
pip install --editable "omc3[all]"

Codes can then be run with either python -m omc3.SCRIPT --FLAG ARGUMENT or calling the .py file directly.

Functionality

Main Scripts

Main scripts to be executed lie in the /omc3 directory. These include:

Plotting Scripts

Plotting scripts for analysis outputs can be found in /omc3/plotting:

Other Scripts

Other general utility scripts are in /omc3/scripts:

Example use for these scripts can be found in the tests files. Documentation including relevant flags and parameters can be found at https://pylhc.github.io/omc3/.

License

This project is licensed under the MIT License - see the LICENSE file for details.