OCELOT Documentation

website·Indexed 29 days ago

https://www.ocelot-collab.com

Documentation and tutorials for OCELOT, a tool for accelerator physicists. It includes guides on beam dynamics, lattice design, Runge-Kutta tracking, and photonics, featuring the RadiationField object for 3D Gaussian radiation pulses and various element architectures like TDCavity and Bend.

Tokens
63.3K
Snippets
273
Records
422
Agent score
50%

What's inside OCELOT

  1. Overview of the RadiationField object

    The RadiationField object in OCELOT represents a 3D coherent radiation distribution (electric field) in the space-time domain. It is compatible with the Genesis dfl structure and provides methods for calculating energy, intensity projections, and performing wave-optics operations such as propagation and wavefront curving.
    from ocelot.optics.wave import RadiationField
    
    dfl = RadiationField()
  2. Overview of the OCELOT Synchrotron Radiation (SR) module

    The OCELOT SR module combines Runge-Kutta particle tracking with a frequency-domain radiation solver to calculate spontaneous-radiation spectra and spatial distributions for a single electron. Magnetic fields can be defined using an Undulator element, on-axis or 3D field maps, or custom Python magnetic-field functions. The beam current is used to normalize results as photon flux.
  3. Overview of the Charged Particle Beam Dynamics (CPBD) Module

    The CPBD module is the core of Ocelot for simulating beam dynamics. It consists of the following components:

    • Elements: Definitions of beamline elements.
    • TransferMaps: Mathematical transformations for beamline elements.
    • MagneticLattice: A class representing a sequence of elements forming a beamline.
    • Navigator: A class used to navigate through beamline lattices during tracking with Physics Processes (PhysProc).
    • Tracking: Functions for particle tracking.
    • Matching: Tools for matching beam optics to specific desired parameters.
    • MOGA (Multi-Objective Genetic Algorithm): Used for optimizing beamline designs.
  4. Overview of Longitudinal Space Charge (LSC) modeling in Ocelot

    The LSC class in Ocelot models the Longitudinal Space Charge (LSC) effect using an impedance-based approach. LSC is caused by the self-induced electric field of a relativistic electron bunch, which can lead to energy modulations, degrade bunch compression, and seed microbunching instabilities, impacting Free-Electron Laser (FEL) performance. The implementation supports both Gaussian and uniform transverse beam profiles.
  5. Overview of SecondTM second-order transformation

    SecondTM is the standard second-order transformation in CPBD. Unlike a simple TransferMap with a correction, it is a distinct transformation family with its own runtime algorithm. It consumes a SecondOrderParams object to apply both linear and quadratic parts of a map. It is typically used when first-order maps are insufficient but full field-integration or dedicated kick algorithms are not required.
  6. Overview of Ocelot for FEL and Storage Ring Light Sources

    Ocelot is a Python-based framework designed for studying Free Electron Lasers (FEL) and storage ring-based light sources. It provides tools for beam physics simulations and allows developers to create custom modules leveraging the Python library ecosystem. Additionally, it supports the creation of intuitive GUIs to integrate simulation scripting into control room operations.
  7. Overview of the ocelot.cpbd.matcher API

    The ocelot.cpbd.matcher API (available from version 26.03) is an object-oriented matching framework designed for beam optics. It replaces the legacy cpbd.match.py workflow with a clearer model consisting of three main components: Variables (what the optimizer changes), Targets (constraints to satisfy), and Objectives (extra terms to minimize). The solver works by minimizing the sum of weighted squared residuals: sum(weighted_residual_i^2).
  8. Overview of Runge-Kutta (RK) Transfer Maps

    OCELOT Runge-Kutta transfer maps track particles through static magnetic field callbacks. They are used when analytic matrix or kick models are insufficient, such as for 3D magnetic field maps, synchrotron-radiation (SR) calculations, or CSR calculations. The RK integrator uses the longitudinal coordinate of the field frame as the independent variable (it is not time-based). Note that current RK maps only support static magnetic fields; electric fields or time-dependent RF fields must still use cavity transfer maps.
  9. Overview of the Navigator class

    The Navigator class is responsible for tracking particles through a MagneticLattice. It defines the step size (dz) for tracking and manages which physical processes are applied during each step, updating the particle position and applying relevant physics as they travel through the lattice.
  10. Overview of the SpaceCharge class

    The SpaceCharge class models space charge forces in a particle beam by solving the Poisson equation in the bunch frame. It uses an integral representation of the electrostatic potential via convolution of the free-space Green's function with the charge distribution, solved using the Fast Fourier Transform (FFT). The resulting Lorentz transformed electromagnetic field is then applied as a kick in the laboratory frame.
  11. Simulate longitudinal beam dynamics with the Chicane class

    The Chicane class models the effects of a chicane in particle accelerators, specifically calculating changes in the longitudinal position of beam particles based on energy deviation. It is used to simulate longitudinal compression or the introduction of an energy chirp.