# <img src="https://raw.githubusercontent.com/pylhc/pylhc.github.io/master/docs/assets/logos/OMC_logo.svg" height="28"> 3 - GUI

[![Tests](https://github.com/pylhc/omc3_gui/actions/workflows/coverage.yml/badge.svg?branch=master)](https://github.com/pylhc/omc3_gui/actions/workflows/coverage.yml)
[![Code Climate coverage](https://img.shields.io/codeclimate/coverage/pylhc/omc3_gui.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3_gui)
[![Code Climate maintainability (percentage)](https://img.shields.io/codeclimate/maintainability-percentage/pylhc/omc3_gui.svg?style=popout)](https://codeclimate.com/github/pylhc/omc3_gui)
[![GitHub last commit](https://img.shields.io/github/last-commit/pylhc/omc3_gui.svg?style=popout)](https://github.com/pylhc/omc3_gui/)
[![GitHub release](https://img.shields.io/github/release/pylhc/omc3_gui.svg?style=popout)](https://github.com/pylhc/omc3_gui/)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8060665.svg)](https://doi.org/10.5281/zenodo.8060665)

This is the graphical user interface wrapper for ``omc3`, our 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](https://pylhc.github.io/omc3_gui/), `Model` section. 
To contribute, see [our guidelines](https://pylhc.github.io/packages/development/contributing/) on the OMC website.

## Documentation

- Autogenerated docs via `Sphinx` can be found at <https://pylhc.github.io/omc3_gui/>.
- General documentation of the OMC Team is located at <https://pylhc.github.io/>.

## Installing

Installation is easily done via `pip`:

```
pip install omc3_gui
```


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)
```bash
git clone https://github.com/pylhc/omc3_gui
pip install --editable "omc3_gui[all]"
```

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

## Functionality

#### Main Scripts

Main scripts to be executed lie in the [`/omc3_gui`](omc3_gui) directory. These include:
- `sbs_gui.py` GUI for Segment-by-Segment analysis.


## License

This project is licensed under the `MIT License` - see the [LICENSE](LICENSE) file for details.
