Skip to content

PyTao

PyTao is wrapper on top of the particle accelerator design and simulation tool Tao. It allows users to access Tao via its shared library libtao.so using ctypes.

Tao and Bmad

Tao is an open source general purpose program for charged particle and X-ray simulations in particle accelerators and storage rings. It is built on top of the Bmad toolkit (software library) which provides the needed computational routines needed to do simulations. Essentially you can think of Tao as a car and Bmad as the engine that powers the car. In fact Bmad powers a number of other simulation programs but that is getting outside of the scope of this manual. It is sometimes convenient to be able to run Tao via Python. For example, in an online control system environment.

Documentation for Bmad and Tao, as well as information for downloading the code if needed is given on the Bmad web site

Additional CLI Tools

In addition to the python library itself, pytao ships with some CLI tools useful for interacting with and maintaining Bmad lattices using Tao.

  • pytao: An IPython entrypoint dropping you into an interactive shell with your lattice loaded.
  • pytao-constraints: A constraint checker and regression testing tool for Bmad lattices built on top of pytao.