Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
659c07f
Wake __init__ improvement
st-walker Mar 8, 2024
5406939
SmoothBeam __init__ improvement
st-walker Mar 8, 2024
9487863
SliceParameters.extract_slice method
st-walker Mar 8, 2024
597f10d
Merge branch 'master' of https://github.com/ocelot-collab/ocelot into…
st-walker Mar 8, 2024
62bef20
Fix crash in notebook
st-walker Mar 11, 2024
660cdb0
fix crash in notebook again
st-walker Mar 13, 2024
a1cf22a
readme minor update
sergey-tomin Mar 13, 2024
138e78f
minor
sergey-tomin Mar 13, 2024
7a2dd2e
update AUTHORS
ZeugAusHH Mar 13, 2024
6294c4f
update of readme.md
sergey-tomin Mar 15, 2024
b4e26d0
Merge pull request #218 from ZeugAusHH/cl_20240313__authors
sserkez Mar 20, 2024
38c6488
Merge branch 'dev' of https://github.com/ocelot-collab/ocelot into dev
st-walker Mar 27, 2024
da8aa96
added color map to show_density function
sergey-tomin Apr 15, 2024
fd50661
Merge branch 'dev' of https://github.com/ocelot-collab/ocelot into dev
sergey-tomin Apr 15, 2024
01f15b8
fix
sergey-tomin Apr 16, 2024
61118dd
added check if lattice in Navigator(lattice) and in navi.lat is the s…
sergey-tomin May 9, 2024
b739e62
added check if step of the PhysProc is not integer number. If not it …
sergey-tomin May 9, 2024
d126c84
added cmap argument to show_density and show_e_beam()
sergey-tomin May 9, 2024
c91ee80
Replace deprecated functions in scipy v1.14.0
cr-xu Jun 25, 2024
6c6c8d5
Update `simpson` fix
cr-xu Jun 25, 2024
d05f09b
Merge pull request #256 from cr-xu/update-scipy-compatibility
st-walker Jun 25, 2024
4891226
added function to get dipole wake from the table.
sergey-tomin Jul 10, 2024
c11d31e
minor changes
sergey-tomin Jul 10, 2024
a0eddcd
added utilities for dechirper LPS reconstruction
sergey-tomin Jul 10, 2024
a92cf84
added possiblity to generate arbitrary shape current profile
sergey-tomin Jul 16, 2024
a8d6d6f
added unit test, updated unit test after change of generation_parray,…
sergey-tomin Jul 16, 2024
cf932dd
Merge remote-tracking branch 'origin/master' into dev
sergey-tomin Jul 16, 2024
aed60ac
fix problem with new version of matplotlib. have to check compatibili…
sergey-tomin Jul 24, 2024
6943834
added PMAGNET
sergey-tomin Jul 31, 2024
c0e1253
fixed wrong docstring for aperture element
sergey-tomin Aug 29, 2024
b0a7ed5
fixing some docstring comments
sergey-tomin Sep 5, 2024
2283a80
minor
sergey-tomin Oct 7, 2024
c6615cc
added slice analysis. Unit tests have to be added
sergey-tomin Oct 8, 2024
73e289d
fixed an error found by Alberto
sergey-tomin Dec 9, 2024
aaca656
new rc
sergey-tomin Dec 9, 2024
90ed9cd
new rc
sergey-tomin Dec 9, 2024
47221c7
added py.typed
sergey-tomin Dec 11, 2024
7e2fe74
added unit test for parray generateion with different current shape. …
sergey-tomin Jan 7, 2025
e43ff59
implemented IBS effect and covered with unit tests
sergey-tomin Jan 8, 2025
3f18118
added new method for beam matching based on linear solution
sergey-tomin Jan 17, 2025
6b29fcd
added **kwarg to main physproc classes. modified documentation
sergey-tomin Jan 17, 2025
549486a
minor ibs class change
sergey-tomin Jan 25, 2025
0351814
removed unused functions in magnetic_lattice.py
sergey-tomin Jan 27, 2025
30f9d7e
added crisp functions
sergey-tomin Feb 5, 2025
c120355
removed unused functions and dependencies
sergey-tomin Feb 5, 2025
5e167f3
added function to change bunch compressor in utils.py - do not cover …
sergey-tomin Feb 7, 2025
fe7a0dc
added slice argument to match_beam
sergey-tomin Feb 13, 2025
1d93215
added slice argument in track function
sergey-tomin Feb 13, 2025
f33e389
fixed sign of survey function. Minor change in physics proc. Twiss cl…
sergey-tomin Mar 3, 2025
d917206
Allow coupling a series of quads in `match` function.
delaossa Mar 7, 2025
145002a
created image_analysis.py module for offline LPS analysis
sergey-tomin Mar 11, 2025
3bc70ba
TWCavity implemented but not yet tested and long dynamics has to be c…
sergey-tomin Mar 28, 2025
0332065
Fix variable initialization in case of dict.
delaossa Mar 30, 2025
3944bc3
Minor rephrasing in docstring.
delaossa Mar 31, 2025
c77574a
Add unit test for coupling quads strengths in `match` function.
delaossa Mar 31, 2025
01d3304
Minor rephrasing in docstring 2.
delaossa Apr 1, 2025
b2fd51f
Merge branch 'dev' into quads_coupling_in_match
delaossa Apr 1, 2025
4907852
Correction.
delaossa Apr 1, 2025
8d0f0ad
minor changes in utils/image_analysis.py and added units attribute to…
sergey-tomin Apr 2, 2025
8c89d34
minor update of triplet example
sergey-tomin Apr 4, 2025
dd709f9
added example for beginners
sergey-tomin Apr 13, 2025
7764928
totalLen has to be defined differently. fixed it
sergey-tomin Apr 13, 2025
1cb0b17
Merge pull request #275 from delaossa/quads_coupling_in_match
sergey-tomin Apr 13, 2025
ed8ef59
Merge branch 'dev' of https://github.com/ocelot-collab/ocelot into dev
sergey-tomin Apr 13, 2025
abc55bc
fixed bug with experimental delta constrain.
sergey-tomin Apr 13, 2025
911295a
one example about optics design.
sergey-tomin Apr 13, 2025
37b1954
update minor
sergey-tomin Apr 13, 2025
e7f0d97
added new tutorial
sergey-tomin Apr 14, 2025
cee3357
small changes in plot_API function
sergey-tomin Apr 14, 2025
3a8959b
added new tutorial.
sergey-tomin Apr 16, 2025
5ae4054
jupter notebooks updates
sergey-tomin Apr 18, 2025
98f7ac4
minor update
sergey-tomin Apr 18, 2025
ece943c
improve Twiss class to automatically calculate gamma_x, gamma_y, emit…
sergey-tomin May 5, 2025
a78086b
improve Twiss class to automatically calculate gamma_x, gamma_y, emit…
sergey-tomin May 5, 2025
da5d467
fixed demos scripts
sergey-tomin May 6, 2025
1218f67
fixed absence gamma_xy in plotting functions
sergey-tomin May 6, 2025
1b453d0
added ParticleArray.get_twiss() function
sergey-tomin May 11, 2025
af30206
fix bug with Twiss class
sergey-tomin May 14, 2025
cd453c4
added unittest for twiss class
sergey-tomin May 14, 2025
130d3d1
added dispersion correction to get_envelop and added unit test
sergey-tomin May 26, 2025
4cbb926
added a few image analysis functions and untit test from it
sergey-tomin May 26, 2025
89eb3e5
some changes to improve CSR performace
sergey-tomin May 26, 2025
b5977bb
added a few function for dechirper reconstruction
sergey-tomin May 26, 2025
c9aa6c3
tdcavity fixed wrong docstring
sergey-tomin May 26, 2025
165a74d
added dispersion to twiss_track Class from get_envelope
sergey-tomin May 26, 2025
8d006e5
Allow passing custom get_twiss function to track.
delaossa May 27, 2025
659f2f3
remove print from CSR
sergey-tomin May 27, 2025
a57a5d9
added tutorial about get_envelope function
sergey-tomin May 31, 2025
92b5fd9
better approximation for moments calculation in get_envelope function
sergey-tomin May 31, 2025
3e9952c
preparing for merge with master branch?
sergey-tomin Jun 2, 2025
8ea1f16
added option to config to not save file after section track is finished
sergey-tomin Jun 3, 2025
b7b0225
fix bug with chunk in mpi_utils
sergey-tomin Jun 4, 2025
74a1fe3
Add docstring
delaossa Jun 4, 2025
293f106
Add unit test for custom `get_twiss` function
delaossa Jun 4, 2025
9bc5d44
Add test function to the list
delaossa Jun 4, 2025
4bdde84
Merge pull request #282 from delaossa/get_twiss_func
sergey-tomin Jun 4, 2025
f476f3d
updated 2 tutorial
sergey-tomin Jun 5, 2025
5a7ad29
small improvements for section track
sergey-tomin Jun 6, 2025
36e19ee
minor docs string update
sergey-tomin Jun 14, 2025
9ac2626
added a couple of new jupter notebooks
sergey-tomin Jun 14, 2025
55ffb5e
minor docstring fixes
sergey-tomin Jun 15, 2025
eb291ff
added new doc page about TDCavity
sergey-tomin Jun 16, 2025
a0ca4f2
added documentation about longitudinal space charge
sergey-tomin Jul 4, 2025
276da0d
added support of LSC in undulators and added option to change slice w…
sergey-tomin Jul 4, 2025
2425333
fixed bug with navigator reset_position() method. now it also call ph…
sergey-tomin Jul 4, 2025
64fca46
minor, docstring improved
sergey-tomin Jul 4, 2025
7664ead
added new feature to show_density. now it can plot particles with sca…
sergey-tomin Jul 4, 2025
4272d12
added new feature to show_density. updated CHANGELOG.md
sergey-tomin Jul 4, 2025
d0f050d
added comparison with 3D SC effect in LSC documentation
sergey-tomin Jul 4, 2025
0b7f38b
minor improvement of image analysis and dechirper reconstruction
sergey-tomin Jul 16, 2025
81c595c
added IBS into section track and added option to calculate Twiss with…
sergey-tomin Jul 16, 2025
023a4e2
Updated intro and readme.md
sergey-tomin Jul 16, 2025
f765fee
minor improvement in Jupyter tutorials
sergey-tomin Jul 16, 2025
0cce4af
minor improvement in Jupyter tutorials
sergey-tomin Jul 16, 2025
64c4de7
update unit test
sergey-tomin Jul 16, 2025
2d3c97e
updated tutorials
sergey-tomin Jul 17, 2025
9233a33
minor tutorial updates
sergey-tomin Jul 17, 2025
04b98ae
added toml file
sergey-tomin Jul 17, 2025
b3dfdc5
updates space charge unit test to reduce file size
sergey-tomin Jul 17, 2025
1205f31
Release v25.07.0: version bump and metadata update
sergey-tomin Jul 17, 2025
7d0d3af
updated meta.yaml and Rename package to ocelot-collab for PyPI
sergey-tomin Jul 17, 2025
55aa579
Add long_description for PyPI
sergey-tomin Jul 17, 2025
a58bb87
new minor changes for pip installation
sergey-tomin Jul 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ cpbd modules, optics functions, CSR,
tracking module, orbit correction module,
optimizer, SR module, LH, tutorials

Svitozar Serkez svitozar.serkez@xfel.eu
genesis2 & genesis4 adaptors,
coherent radiation class,
SASE estimator & imitator,
Stokes parameters class.

Ilya Agapov ilya.agapov@desy.de
architecture, optimizer, x-ray optics,
genesis2 adaptor
Expand All @@ -17,15 +23,13 @@ space charge, CSR, wakefields, LH
Gianluca Geloni
genesis2 adaptor

Svitozar Serkez svitozar.serkez@xfel.eu
genesis2 & genesis4 adaptors,
coherent radiation class,
SASE estimator & imitator,
Stokes parameters class.

Mykola Veremchuk, Andrei Trebushinin
Stokes parameters calculation & visualization,
coherent radiation class, unit tests, examples

Michael Boese michael.boese@desy.de
Michael Boese
architecture, cpbd

Christoph Lechner
adaptors for "GENESIS 1.3", v4 and v2; functions for plotting of simulation results;
control of MPI simulation jobs
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- `remove_coupler_kick` convenience method for Cavity class
- Integrated quad strengths for `k1` and `k2` convenience getters/setters (`k1l` and `k2l).
- Added new method `Navigator.add_physics_processes` for adding multiple physics processes at the same time. This will be a lot fastwe when lots of physics processes are to be added.
>>>>>>> 6fdd98a24d013057498abd8e9ccf734939ef30e7
- `Navigator.jump_to` method allowing a `Navigator` instance to jump
to arbitrary points in z along the magnetic lattice. Useful as it
does not require modifying the underling beamling to achieve
equivalent behaviour.
- new `__repr__` methods for some common physics processes: `CSR`, `SmoothBeam`, `SpaceCharge` and `WakeTable`.
- `SmoothBeam` mslice attribute can now be set in the `__init__`.
- `extract_slice` method on SliceParameters instances
- modified the 'MagneticLattice.transfer_maps()' method. When using the 'output_at_each_step=True' flag,
the method returns (Bs, Rs, Ts, S), where 'S' is a list of coordinates after each transfer map.
- New `WakeTable3` and `Wake3` class for third order Taylor expansion of wakefield tracking.
- New wake table for the wakefields of parallel plate structure based on analytical results, `WakeTableParallelPlate_origin`, `WakeTableParallelPlate`,
`WakeTableParallelPlate3_origin`, `WakeTableParallelPlate3`. The waketables with `origin` use point charge wake at the vicinity of the drive particle, which is the upper limit for wake.
The other two waketables contain exponential decay term. The waketables with `3` provide third order Taylor expansion and should be used with `Wake3`.

- added ParticleArray.get_twiss() method which calls get_envelop()
- Twiss recalculates gamma_x/y and emit_x/y automatically
- added link between quads to match function, e.g. vars = [{QF: 1.0, QD: -1.0}],
- Added dispersion auto correction in get_envelope function, it calculates dispersion from statistics and correct it if needed
- added image analysis functions to utils
- added LSC for undulators
- added in LSC feature to control size of the slice for transverse beam sizes calculation
- added new feature to show_density(). now it can plot particles with scatter plot and color of the individual particle will correspond to density - slower but maybe can be visual pleasing for presentations

>>>>>>> 6fdd98a24d013057498abd8e9ccf734939ef30e7

### Fixed

- fixed bugs in matching function if Drift length is in list of variables.
- fixed bug with match function delta constrain
- fixed geometrical angle approximation in get_envelope function
- fixed bug with navigator reset_position() method. now it also call physics process .prepare() method

### Removed

Expand Down
212 changes: 45 additions & 167 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,172 +1,50 @@
Accelerator, radiation and x-ray optics simulation framework

# An Introduction to Ocelot

Ocelot is a multiphysics simulation toolkit designed for studying FEL and storage ring-based light sources. Ocelot is written in Python. Its central concept is the writing of python's scripts for simulations with the usage of Ocelot's modules and functions and the standard Python libraries.

Ocelot includes following main modules:
* **Charged particle beam dynamics module (CPBD)**
- optics
- tracking
- matching
- collective effects (description can be found [here](http://vrws.de/ipac2017/papers/wepab031.pdf) and [here](https://journals.aps.org/prab/abstract/10.1103/PhysRevAccelBeams.22.024401))
- Space Charge (3D Laplace solver)
- CSR (Coherent Synchrotron Radiation) (1D model with arbitrary number of dipoles).
- Wakefields (Taylor expansion up to second order for arbitrary geometry).
- MOGA (Multi Objective Genetics Algorithm) [ref](http://accelconf.web.cern.ch/AccelConf/ipac2016/papers/thpmb034.pdf).
* **Native module for spontaneous radiation calculation** (some details can be found [here](http://accelconf.web.cern.ch/AccelConf/ipac2019/papers/wepts017.pdf) and [here](http://scripts.iucr.org/cgi-bin/paper?S1600577519002509))
* **FEL calculations: interface to GENESIS and pre/post-processing**
* **Modules for online beam control and online optimization of accelerator performances.** [ref1](http://accelconf.web.cern.ch/accelconf/IPAC2014/papers/mopro086.pdf), [ref2](https://jacowfs.jlab.org/conf/y15/ipac15/prepress/TUPWA037.PDF), [ref3](http://accelconf.web.cern.ch/AccelConf/ipac2016/papers/wepoy036.pdf), [ref4](https://arxiv.org/pdf/1704.02335.pdf).
- This module is being developed in collaboration with other accelerator groups. The module has been migrated to a separate [repository](https://github.com/ocelot-collab/optimizer) (in [ocelot-collab](https://github.com/ocelot-collab) organization) for ease of collaborative development.

Ocelot extensively uses Python's [NumPy (Numerical Python)](http://numpy.org) and [SciPy (Scientific Python)](http://scipy.org) libraries, which enable efficient in-core numerical and scientific computation within Python and give you access to various mathematical and optimization techniques and algorithms. To produce high quality figures Python's [matplotlib](http://matplotlib.org/index.html) library is used.

It is an open source project and it is being developed by physicists from [The European XFEL](http://www.xfel.eu/), [DESY](http://www.desy.de/) (Germany), [NRC Kurchatov Institute](http://www.nrcki.ru/) (Russia).

We still have no documentation but you can find a lot of examples in /demos/ folder including this tutorial

## Ocelot user profile

Ocelot is designed for researchers who want to have the flexibility that is given by high-level languages such as Matlab, Python (with Numpy and SciPy) or Mathematica.
However if someone needs a GUI it can be developed using Python's libraries like a [PyQtGraph](http://www.pyqtgraph.org/) or [PyQt](http://pyqt.sourceforge.net/Docs/PyQt4/).


## Preliminaries

The tutorial includes 9 examples dedicated to the beam dynamics and optics and 5 to Photon Field Simulation. However, you should have a basic understanding of Computer Programming terminologies. A basic understanding of Python language is a plus.

##### This tutorial requires the following packages:

- Python 3.6 - 3.8
- `numpy` version 1.8 or later: http://www.numpy.org/
- `scipy` version 0.15 or later: http://www.scipy.org/
- `matplotlib` version 1.5 or later: http://matplotlib.org/
- `ipython` version 2.4 or later, with notebook support: http://ipython.org

**Optional**, but highly recommended for speeding up calculations
- numexpr (version 2.6.1)
- pyfftw (version 0.10)
- numba

**Orbit Correction module**
- pandas

The easiest way to get these is to download and install the (large) [Anaconda software distribution](https://www.continuum.io/).

Alternatively, you can download and install [miniconda](https://docs.conda.io/en/latest/miniconda.html).
The following command will install all required packages:
```
$ conda install numpy scipy matplotlib jupyter
```

## Ocelot installation
##### Anaconda Cloud **recommended**
The easiest way to install OCELOT is to use Anaconda cloud. In that case use command:
```
$ conda install -c ocelot-collab ocelot
```
##### GitHub
Clone OCELOT from GitHub:
```
$ git clone https://github.com/ocelot-collab/ocelot.git
```
or download last release [zip file](https://github.com/ocelot-collab/ocelot/archive/v18.02.0.zip).
Now you can install OCELOT from the source:
```
$ python setup.py install
```

##### PythonPath
Another way is download ocelot from [GitHub](https://github.com/ocelot-collab/ocelot)
1. you have to download from GitHub [zip file](https://github.com/ocelot-collab/ocelot/archive/master.zip).
2. Unzip ocelot-master.zip to your working folder **/your_working_dir/**.
3. Add **../your_working_dir/ocelot-master** to PYTHONPATH
- **Windows 7:** go to Control Panel -> System and Security -> System -> Advance System Settings -> Environment Variables.
and in User variables add **/your_working_dir/ocelot-master/** to PYTHONPATH. If variable PYTHONPATH does not exist, create it

Variable name: PYTHONPATH

Variable value: ../your_working_dir/ocelot-master/
- Linux:
```
$ export PYTHONPATH=/your_working_dir/ocelot-master:$PYTHONPATH
```

#### To launch "ipython notebook" or "jupyter notebook"
in command line run following commands:

```
$ ipython notebook
```

or
```
$ ipython notebook --notebook-dir="path_to_your_directory"
```

or
```
$ jupyter notebook --notebook-dir="path_to_your_directory"
```

#### OCELOT jupyter tutorials
You can download OCELOT jupyter tutorials (release v18.02) using GitHub link [zip file](https://github.com/ocelot-collab/ocelot/releases/download/v18.02.0/ocelot_jupyter_tutorial.zip).

## Tutorials
* Preliminaries: Setup & introduction
#### Beam dynamics

* [Introduction. Tutorial N1. Linear optics](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/1_introduction.ipynb)
- Linear optics. Double Bend Achromat (DBA). Simple example of usage OCELOT functions to get periodic solution for a storage ring cell.
* [Tutorial N2. Tracking](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/2_tracking.ipynb)
- Linear optics of the European XFEL Injector.
- Tracking. First and second order.
- Artificial beam matching - BeamTransform
* [Tutorial N3. Space Charge](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/3_space_charge.ipynb)
- Tracking through RF cavities with SC effects and RF focusing.
* [Tutorial N4. Wakefields](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/4_wake.ipynb)
- Tracking through corrugated structure (energy chirper) with Wakefields
* [Tutorial N5. CSR](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/5_CSR.ipynb)
- Tracking trough bunch compressor with CSR effect.
* [Tutorial N6. RF Coupler Kick](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/6_coupler_kick.ipynb)
- Coupler Kick. Example of RF coupler kick influence on trajjectory and optics.
* [Tutorial N7. Lattice design](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/7_lattice_design.ipynb)
- Lattice design, twiss matching, twiss backtracking
* [Tutorial N8. Physics process addition. Laser heater](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/8_laser_heater.ipynb)
- Theory of Laser Heater, implementation of new Physics Process, track particles w/o laser heater effect.
* [Tutorial N9. Simple accelerator based THz source](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/9_thz_source.ipynb)
- A simple accelerator with the electron beam formation system and an undulator to generate THz radiation.

#### Photon field simulation

* [PFS tutorial N1. Synchrotron radiation module](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/pfs_1_synchrotron_radiation.ipynb).
- Simple examples how to calculate synchrotron radiation with OCELOT Synchrotron Radiation Module.
* [PFS tutorial N2. Coherent radiation module and RadiationField object](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/pfs_2_radiation_field.ipynb).
* [PFS tutorial N3. Reflection from imperfect highly polished mirror](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/pfs_3_imperfect_mirror.ipynb).
* [PFS tutorial N4. Converting synchrotron radiation Screen object to RadiationField object for viewing and propagation](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/pfs_4_synchrotron_radiation_visualization.ipynb).
* [PFS tutorial N5: SASE estimation and imitation](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/pfs_5_SASE_Estimator_and_Imitator.ipynb).

#### Appendixes
* [Undulator matching](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/undulator_matching.ipynb).
- brief theory and example in OCELOT
* [Some useful OCELOT functions](http://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/small_useful_features.ipynb)
- Aperture, RK tracking
* [Example of an accelerator section optimization](https://nbviewer.jupyter.org/github/ocelot-collab/ocelot/blob/master/demos/ipython_tutorials/accelerator_optim.ipynb)
- A simple demo of accelerator section optimization with a standard scipy numerical optimization method.
## Documentation
The API documentation can be build using [sphinx](https://sphinx.org).
To do so, you have to clone the repository or download the zip file, as explained in the [ocelot installation section](#ocelot-installation).
Then you can install all dependencies by running
``` bash
python -m pip install -r docs/requirements.txt
python setup.py install
```
Now you can build the documentation by running
```
python setup.py build_sphinx
```
If these steps succeeded (yes, there are still very many errors and warnings during building the documentation),
you can browse the HTML documentation by opening `build/sphinx/html/index.html` in your browser.
# Ocelot

Ocelot is an open-source multiphysics simulation toolkit for accelerator physics.
It is designed to model Free Electron Lasers (FELs), storage rings, and transport lines using a modular and scriptable Python interface.

- **Website**: [https://www.ocelot-collab.com](https://www.ocelot-collab.com)
- **Documentation**: [https://www.ocelot-collab.com/docs/docu/intro](https://www.ocelot-collab.com/docs/docu/intro)
- **Tutorials**: [https://www.ocelot-collab.com/docs/tutorial/intro](https://www.ocelot-collab.com/docs/tutorial/intro)
- **Source code**: [https://github.com/ocelot-collab/ocelot](https://github.com/ocelot-collab/ocelot)
- **Bug reports**: [https://github.com/ocelot-collab/ocelot/issues](https://github.com/ocelot-collab/ocelot/issues)
- **License**: [GPL-3.0 license](https://github.com/ocelot-collab/ocelot/blob/master/LICENSE)

---

## Features

Ocelot provides:

- A modular framework for beam dynamics simulations (tracking, optics, matching)
- Physics processes including:
- Space charge
- Coherent synchrotron radiation (CSR)
- Wakefields
- and many more
- A framework for FEL-related studies and synchrotron calculation
- Jupyter-based interactive tutorials for education and development


---

## Getting Started

For requirements and installation instructions, see the official guide:
👉 [**Installation & Setup**](https://www.ocelot-collab.com/docs/docu/intro)

To explore tutorials, visit:
👉 [**Tutorial Overview**](https://www.ocelot-collab.com/docs/tutorial/intro)
👉 [**Student-Friendly Introduction**](https://www.ocelot-collab.com/docs/tutorial/tutorial-beam-dynamics/for_students)

---

We welcome feedback, contributions, and new ideas from the accelerator community!

- [How to create a pull request](https://www.ocelot-collab.com/docs/docu/how-to/pull_request)
- [How to add unit tests](https://www.ocelot-collab.com/docs/docu/how-to/unit_test)
- [How to create your own Physics Process class](https://www.ocelot-collab.com/docs/docu/how-to/phys_proc)

**Disclaimer:** The OCELOT code comes with absolutely NO warranty. The authors of the OCELOT do not take any responsibility for any damage to equipments or personnel injury that may result from the use of the code.
39 changes: 24 additions & 15 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
package:
name: ocelot
version: '24.03.0'
version: "25.07.0"

source:
git_rev: 24.03.0
git_url: https://github.com/ocelot-collab/ocelot.git
git_tag: v25.07.0

build:
noarch: python
script: python -m pip install . --no-deps -vv

requirements:
build:
- python
host:
- python >=3.9
- pip
- setuptools
- numpy >=1.9
run:
- python >=3.9
- numpy
- scipy
- matplotlib
- pandas
- alabaster==0.7.12
- Sphinx==3.2.1
- sphinxcontrib-jsmath==1.0.1
run:
- python
- numpy >=1.9
- scipy

- h5py

about:
home: https://github.com/ocelot-collab/ocelot
license: GNU General Public License v3.0
license_file: LICENSE
license: GPL-3.0
license_file: LICENSE
summary: "Accelerator, radiation, and x-ray optics simulation framework"
description: |
OCELOT is a simulation toolkit for modeling beam dynamics and synchrotron radiation in accelerators.
doc_url: https://ocelot-collab.github.io
dev_url: https://github.com/ocelot-collab/ocelot

extra:
recipe-maintainers:
- sergey-tomin
Loading
Loading