PyLHC Tools
This package is a collection of useful scripts and tools for the Optics Measurements and Corrections group (OMC) at CERN.
Documentation
- Autogenerated docs via
Sphinx
can be found at https://pylhc.github.io/PyLHC/. - General documentation of the OMC-Team is located at https://pylhc.github.io/
Getting Started
This package is Python 3.7+
compatible, and can be installed through pip
:
pip install pylhc
One can also install from VCS:
git clone https://github.com/pylhc/PyLHC
pip install /path/to/PyLHC
Or simply from the online master branch, which is stable:
pip install git+https://github.com/pylhc/PyLHC.git#egg=pylhc
After installing, scripts can be run with either python -m pylhc.SCRIPT --FLAG ARGUMENT
or by calling the .py
files directly.
Note: some scripts access functionality only available on the CERN Technical Network. To use those, you should make sure to install the relevant extra dependencies with pip install path/to/Pylhc[cern]
.
Description
This package provides tools for particle accelerator data analysis, simulations management and machine information extraction; complementing the optics measurement analysis tools of the omc3 package.
Functionality
Forced DA Analysis
- Script to analyse forced DA. (forced_da_analysis.py)Machine Settings Info
- Prints an overview over the machine settings at a given time. (machine_settings_info.py)BSRT Logger
andBSRT Analysis
- Saves data coming straight from LHC BSRT FESA class and allows subsequent analysis. (bsrt_logger.py & bsrt_analysis.py )BPM Calibration Factors
- Compute the BPM calibration factors using ballistic optics. Two methods are available: using the beta function and using the dispersion. (bpm_calibration.py)
Quality checks
- Unit and accuracy tests are run automatically through CI Github Actions. See our workflows in this readme.
- Additional checks for code-complexity, design-rules, test-coverage and duplication are made through CodeClimate.
- Pull requests implementing functionality or fixes are merged into the master branch after passing CI, and getting a reviewer's approval.
Changelog
See the CHANGELOG file.
Hints for Developers
In case you want to contribute to PyLHC
's development, you should install it in editable
mode:
git clone https://github.com/pylhc/PyLHC
pip install --editable PyLHC
You can install extra dependencies (as defined in setup.py
) suited to your use case with the following commands:
pip install --editable PyLHC[cern]
pip install --editable PyLHC[test]
pip install --editable PyLHC[test,doc]
pip install --editable PyLHC[all]
Open an issue, make your changes in a branch and submit a pull request.
Authors
- pyLHC/OMC-Team - Working Group - pyLHC
License
This project is licensed under the GNU GPLv3
License - see the LICENSE file for details.