No project description provided
Project description
CLICopti
CLICopti is a C++ library for quickly estimating the parameters of an RF structure from its length, apertures, tapering, and cell design. It can be ran directly or from a Octave- or Python wrapper. Typical estimated parameters are the input power required to reach a certain voltage with a given beam current, the maximum safe pulse length for a given input power and the minimum bunch spacing in RF cycles allowed by a given long-range wake limit.
Current maintainer: Andrea Latina (CERN)
Authors:
- Kyrre Sjobak, University of Oslo and CERN (2013-2014, 2021, 2024-)
- Daniel Schulte, CERN (2013-)
- Alexej Grudiev, CERN (2013-2014)
- Andrea Latina, CERN (2014-)
- Jim Ögren, Uppsala University and CERN (2017-2019)
Citing CLICopti and references
We have invested a lot of time and effort in creating and maintaining the CLICopti library, please cite it when using it. For information for how to cite CLICopti, please see the CITATION file.
For further reading, the main references for CLICopti are listed in the REFERENCES file.
CLICopti is published under the GNU Lesser General Public License Version 3, please respect it. For details see the LICENSE file.
Installing and using CLICopti
To understand how to use CLICopti, a good place to start is the top-level report listed in the CITATION file, along with reading through structure.h.
C++
For C++, the examples shown in the src folder should hopefully be instructive.
CLICopti can be compiled for C++ by running make in the top-level directory; the test programs are compiled into the top-level folder.
Octave
For Octave, some examples are given in the Octave folder.
Python
For Python, an example notebook is in the Python folder. To install CLICopti for Python to your machine, you can simply run:
pip install git+https://gitlab.cern.ch/clic-software/clicopti.git
To remove it (e.g. for installing a later version), you can run:
pip uninstall CLICopti
You can also download the code to a folder (e.g. with git clone), modify it, and install using:
pip install -v -e path/to/CLICopti
where the path/to/CLICopti is the path to the root of the repository, i.e. the folder containing the README.md you are currently reading.
Here the options -v (verbose) and -e editable have been included.
This shows more information during the installation, and also makes the python code in path/to/CLICopti/Python/CLICopti be the version generally seen by your system.
The effect is that you can change the code and it will immediately take effect everywhere.
The Python interface is build using SWIG. This means that if the underlying C++ API changes, you must manually update the wrapper code before installing with pip.
The developers have normally done this in any versions published to the master branch of the project git repository, however if needed this can be regenerated by
- Running
make cleanthenmakein the top-level folder - Running
make cleanallthenmake installin the swig folder.
This will recreate the files CLICopti.py and CLICopti_python_wrap.cc and place them in the correct locations for Python's setuptools to find them.
It will also copy the cell database files to locations where they will be included
in the Python package.
To test the Python build scripts without installing, you can run
python -m build
in the top level folder. This produces a new dist subfolder containing .whl (wheel) files.
Documentation
The main documentation of the code and the methods implemented is found in the REFERENCES file. In addition, the C++ code has (some) Doxygen documentation.
For the Python interface, this is used to generate Sphinx documentation.
To build this, you must first compile the Python interface using the make commands
in the swig folder as discussed above.
The, in the folder swig/sphinx-doc-python you must run
e.g. make html to build the HTML documentation.
This will then appear in swig/sphinx-doc-python/build/html - see the file index.html.
Releasing new versions of CLICopti
Before releasing, we must update the interface files for Python and Octave which are generated by SWIG, and also the documentation generated using SPHINX.
To do this, run make cleanall and then make install in the toplevel folder.
This will clean the autogenerated files from the swig, Python/CLICopti, and doc/python-sphinx folders.
TODO: Create make gitrelease which will add the files to the commit index, ready to be comitted.
NOTE: if the package is installed (in place?) with pip when running make install, the documentation will not build correctly
FOR DEBUGGING: CPPFLAGS="-g -O0 -Wall" pip install -v -e ~/code/clicopti/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clicopti-2.1.1.tar.gz.
File metadata
- Download URL: clicopti-2.1.1.tar.gz
- Upload date:
- Size: 112.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cc8a53e5c0d41706f5f452537f6a55372157f06305366998617b287efc78d75
|
|
| MD5 |
f7f81ffd8799047ba9caa8d595774f64
|
|
| BLAKE2b-256 |
21ee18807c377161988529148bdb9c4e414f189956d7b92810c905ee3ac49d39
|
File details
Details for the file CLICopti-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: CLICopti-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5307c0e22c38cc5450f684e5ca080e4c9a86d84e7da7d7ccdabc087f4189868
|
|
| MD5 |
bd3e69ab6840ba358216f5ca8d6db766
|
|
| BLAKE2b-256 |
1f186b0184061eae8d938d3469fd1e35b65a3abf941cd1c21d18bb650bdd7f02
|