Skip to main content

PyTao is the Python interface for Bmad's Tao

Project description

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.

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

Documentation
Documentation
Documentation

Installation

See the PyTao installation instructions 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

All platforms:
Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Resources

Bmad website

Quickstart

Start a quick PyTao session with IPython using:

$ 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]: <Tao init='-init tao.init' so_lib='/path/to/libtao.so'>

To use PyTao's plotting with Matplotlib ("mpl", alternatively Bokeh "bokeh"), use the --pyplot argument.

$ 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytao-1.0.1.tar.gz (304.9 kB view details)

Uploaded Source

File details

Details for the file pytao-1.0.1.tar.gz.

File metadata

  • Download URL: pytao-1.0.1.tar.gz
  • Upload date:
  • Size: 304.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytao-1.0.1.tar.gz
Algorithm Hash digest
SHA256 11fe247962210560895f96327eac2fdb5f8f862d3581d1cc8ada7285f78bba9b
MD5 d9adf14c8c45894cc1da947674d5c35f
BLAKE2b-256 7af602bf1f3a7ab9b50906a6461386d5b2fd3f073bf4a81f51382e9db6d2dfb9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page