Skip to content

My master's thesis in physics at Humboldt University of Berlin and Helmholtz-Zentrum Berlin

Notifications You must be signed in to change notification settings

felix-andreas/master-thesis

Repository files navigation

A new Python-based Lattice Development Tool and its Applications at BESSY II

Abstract

Due to the BESSY-VSR upgrade and the design of the next synchrotron radiation facility BESSY III, there are several lattice development tasks at the Helmholtz-Zentrum Berlin (HZB). Within the last several years, there was a significant shift in the physics community from standalone plotting programs, optimization routines, and numerical libraries towards the Python programming language, which absorbed these tools into different packages. At HZB, Python is the predominant programming language used to set up the execution of simulations and to post-process their results. The issue with existing and mature particle accelerator simulation codes is that it is not trivial to integrate them into a typical Python workflow. Many physicists have written several wrapper scripts around the existing simulation codes to leverage the power of Python's rich ecosystem of scientific tools. The issue with these wrappers is that there are often not reusable because they are very specific to a particular task and often rely on string manipulation of the lattice files or run files, which can be very error-prone and is computationally inefficient. Furthermore, these wrapper scripts only give access to the simulation results and not to the underlying internal models of the simulation codes, like the magnetic lattice or information about individual magnets. Therefore it was decided to develop a new Python package that generates an accelerator model from a given lattice file. This model can be queried for information on individual magnets and on properties of composed structures like the length of a cell. It is designed in such an extensible way that it can be used as a foundation for different simulation methods, which can be built on top of it. Such a method, which is capable of computing the Twiss parameters, dispersion function, chromaticity, emittance, and synchrotron radiation integrals, was implemented. This thesis covers how this new tool was developed and then used to optimize the O5T2off optics for the BESSY-VSR project, adapt the beta functions of the BESSY II storage ring for an emittance exchange experiment, and create a framework of automated lattice summaries, which could be useful for the development of a future BESSY III lattice. The developed code does not aim to replace the more mature and full-featured existing particle accelerator codes. However, it extends the ecosystem of accelerator tools by enabling fundamental lattice development using the Python language.

Build Instructions

  1. Start development shell

    nix develop
  2. Render web version

    make html
  3. Render printable HTML

    make print
  4. Serve dist folder and save print.html from Google Chrome as dist/thesis.pdf

    live-server dist
  5. Add bookmarks and metadata to PDF

    python layout/bookmarks.py
  6. (Optional) Render README.md from template layout/templates/README.md

    make README.md
  7. Deploy dist folder to GitHub Pages

    make deploy

About

My master's thesis in physics at Humboldt University of Berlin and Helmholtz-Zentrum Berlin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published