Metadata-Version: 2.4
Name: LightWin
Version: 0.9.4
Summary: Automatically compensate cavity failures in linacs
Author-email: Adrien Plaçais <placais@lpsc.in2p3.fr>, Bruce Yee-Rendon <byee@post.j-parc.jp>, Didier Uriot <didier.uriot@cea.fr>, Frédéric Bouly <bouly@lpsc.in2p3.fr>, Jean-Michel Lagniel <jean-michel.lagniel@ganil.fr>
Project-URL: changelog, https://github.com/AdrienPlacais/LightWin/blob/main/CHANGELOG.md
Project-URL: discussions, https://github.com/AdrienPlacais/LightWin/discussions
Project-URL: documentation, https://lightwin.readthedocs.io/en/latest/
Project-URL: homepage, https://github.com/AdrienPlacais/LightWin
Project-URL: tracker, https://github.com/AdrienPlacais/LightWin/issues
Keywords: failure compensation,linac,linear accelerator,reliability
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cloudpickle<4,>=3
Requires-Dist: matplotlib<4,>=3.9.1
Requires-Dist: numpy<3,>=2
Requires-Dist: pandas<3,>=2.2
Requires-Dist: palettable<4,>=3.3.3
Requires-Dist: pre-commit<5,>=4
Requires-Dist: pymoo<1,>=0.6.1.3
Requires-Dist: scipy<2,>=1.14
Provides-Extra: docs
Requires-Dist: myst-parser<5,>=4; extra == "docs"
Requires-Dist: nbsphinx<1,>=0.9.6; extra == "docs"
Requires-Dist: sphinx-autodoc-typehints<4,>=3.0.1; extra == "docs"
Requires-Dist: sphinx-rtd-theme<4,>=3; extra == "docs"
Requires-Dist: sphinx-tabs<4,>=3.4; extra == "docs"
Requires-Dist: sphinxcontrib-bibtex<3,>=2.6; extra == "docs"
Provides-Extra: test
Requires-Dist: pytest<9,>=8.3.2; extra == "test"
Dynamic: license-file

[![Py versions](https://img.shields.io/badge/python-3.12-blue)](https://img.shields.io/badge/python-3.12-blue)
[![PyPi](https://img.shields.io/pypi/v/lightwin)](https://pypi.org/project/LightWin/)
[![Pytest](https://img.shields.io/badge/py-test-blue?logo=pytest)](https://github.com/AdrienPlacais/LightWin/actions/workflows/test.yml)
[![Documentation status](https://readthedocs.org/projects/lightwin/badge/?version=latest)](https://lightwin.readthedocs.io/en/latest/?badge=latest)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/AdrienPlacais/LightWin/main.svg)](https://results.pre-commit.ci/latest/github/AdrienPlacais/LightWin/main)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

# LightWin
LightWin is a tool to automatically find compensation settings for cavity failures in linacs.

## Installation
The full installation instructions are detailed [here](https://lightwin.readthedocs.io/en/latest/manual/installation.html).
The steps are straightforward and can be summarized as follows:
1. Clone the repository: `git clone git@github.com:AdrienPlacais/LightWin.git`
2. Navigate to the `LightWin` directory, and switch to the last tagged version. For example: `git switch v0.9.3`
3. Install LightWin with all its dependencies: `pip install -e .[test]`
4. Test that everything is working with `pytest -m "not tracewin and not implementation"`.

Note that the TraceWin module will not work out of the box.
You will need to tell LightWin were to find your TraceWin executables.
See [dedicated instructions](https://lightwin.readthedocs.io/en/latest/manual/installation.tracewin.html).

## Documentation
Documentation is now automatically built and hosted on [Read the docs](https://lightwin.readthedocs.io/en/latest/).

## How to run
See [here](https://lightwin.readthedocs.io/en/latest/manual/usage.html).

## Example
See the `data/example` folder.

## Future updates

### 

### BeamCalculator

- [ ] Beam calculator developed by JM Lagniel for SPIRAL2.
- [ ] Envelope solvers with space-charge.

### Quality of life

- [ ] `Plotter` object.
- [ ] Friendlier `Evaluator`.
- [x] Support for `SET_SYNC_PHASE` (see [note](https://lightwin.readthedocs.io/en/latest/manual/usage.html#compatibility-with-tracewin-dat-files)).
- [ ] Better handling of TraceWin errors (currently: a single error and whole run is lost).

### Optimization

- [ ] Correlation matrices.
- [ ] Add [SNS compensation method](doi.org://10.18429/JACoW-LINAC2022-FR1AA06)
