Skip to main content

This notebook was created by Sergey Tomin (sergey.tomin@desy.de). Update January 2025

Tutorials

Current tutorials can be found in ocelot/demos/ipython_tutorial folder.

Beam dynamics

Photon field simulation

Appendixes

  • Undulator matching
    • brief theory and example in OCELOT
  • Some useful OCELOT functions
    • Aperture
    • Losses along accelerator lattice
    • RK tracking
    • Dump the beam distribution at a specific location of the lattice
    • Energy jitter. Or simulation of the jitter in the RF parameters.
    • Get Twiss paremeters from the beam slice
  • Example of an accelerator section optimization
    • A simple demo of accelerator section optimization with a standard scipy numerical optimization method.
  • Ocelot for Students
    • This tutorial is aimed at students and beginners in accelerator physics. The idea is to keep it simple and interactive, helping you build intuition about how magnetic elements work.

Checking your installation

You can run the following code to check the versions of the packages on your system:

(in IPython notebook, press shift and return together to execute the contents of a cell)

import IPython
print('IPython:', IPython.__version__)

import numpy
print('numpy:', numpy.__version__)

import scipy
print('scipy:', scipy.__version__)

import matplotlib
print('matplotlib:', matplotlib.__version__)

import ocelot
print('ocelot:', ocelot.__version__)
    IPython: 8.20.0
numpy: 1.26.3
scipy: 1.11.4
matplotlib: 3.8.2
initializing ocelot...
ocelot: 24.03.0

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.