https://github.com/bmad-sim/pytao
PyTao is Python interface for Tao, which is based on the Bmad subroutine library for relativistic charged–particle and X-ray simulations in accelerators and storage rings.
https://github.com/bmad-sim/pytao
bmad simulation tao
Last synced: 8 days ago
JSON representation
PyTao is Python interface for Tao, which is based on the Bmad subroutine library for relativistic charged–particle and X-ray simulations in accelerators and storage rings.
- Host: GitHub
- URL: https://github.com/bmad-sim/pytao
- Owner: bmad-sim
- License: gpl-3.0
- Created: 2021-02-01T17:30:12.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2026-01-14T17:10:03.000Z (10 days ago)
- Last Synced: 2026-01-14T21:19:11.256Z (10 days ago)
- Topics: bmad, simulation, tao
- Language: Python
- Homepage: https://bmad-sim.github.io/pytao
- Size: 4.17 GB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# PyTao
[PyTao](<(https://bmad-sim.github.io/pytao/index.html)>) is Python interface for [Tao](https://www.classe.cornell.edu/bmad/tao.html), which is based on the Bmad subroutine library for relativistic charged–particle and X-ray simulations in accelerators and storage rings.
Documentation for Bmad and Tao, as well as information for downloading the code if needed is given on the [Bmad website](https://www.classe.cornell.edu/bmad).
| **`Documentation`** |
| --------------------------------------------------------------------------------------------------------------------------- |
| [](https://bmad-sim.github.io/pytao/examples/basic/) |
| [](https://bmad-sim.github.io/pytao/api/pytao/) |
## Installation
See the [PyTao installation instructions](https://bmad-sim.github.io/pytao/user_docs/index.html) for details. The preferred installation method is using conda:
```
conda install -c conda-forge pytao
```
Currently PyTao requires an installed Bmad distribution compiled with the `ACC_ENABLE_SHARED="Y"` or `ACC_ENABLE_SHARED_ONLY="Y"` flag. This can be set in the `bmad_dist/util/dist_prefs` file (the default setting is fine).
## Current Build status and Release Info
| Name | Downloads | Version | Platforms |
| -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [](https://anaconda.org/conda-forge/pytao) | [](https://anaconda.org/conda-forge/pytao) | [](https://anaconda.org/conda-forge/pytao) | [](https://anaconda.org/conda-forge/pytao) |
## Resources
[Bmad website](https://www.classe.cornell.edu/bmad)
## Quickstart
Start a quick PyTao session with IPython using:
```bash
$ pytao -init tao.init
----------------------------------------------------------
Initializing Tao object with the following: -init tao.init
Type`tao.` and hit tab to see available commands.
----------------------------------------------------------
In [1]: tao
Out[1]:
```
To use PyTao's plotting with Matplotlib (`"mpl"`, alternatively Bokeh `"bokeh"`), use the `--pyplot` argument.
```bash
$ pytao --pyplot=mpl -init "$ACC_ROOT_DIR/bmad-doc/tao_examples/cbeta_cell/tao.init"
------------------------------------------------------------------------------------------------------
Initializing Tao object with: -init /Users/klauer/Repos/bmad/bmad-doc/tao_examples/cbeta_cell/tao.init
Type `tao.` and hit tab to see available commands.
------------------------------------------------------------------------------------------------------
* Matplotlib mode configured. Pyplot available as `plt`. *
```
Start pytao's GUI from the command-line with:
```bash
pytao-gui -init tao.init
```
## Release process
To release a new PyTao version with updated bindings for the Fortran functions:
1. Activate a conda environment with `bmad` installed with the target version
2. Double-check that bmad is updated in the environment via `conda list |grep bmad`
3. Run `bash scripts/bump_minimum_version.sh`
4. Commit, push, merge PR, tag, ...
## License
[GNU General Public License](LICENSE)