Python wrapper for TRAVEL particle tracking simulations
Project description
travelpy
Python wrapper for TRAVEL particle tracking simulations.
Overview
travelpy provides a modern Python interface to the TRAVEL particle tracking code, making it easier to:
- Run TRAVEL simulations from Python scripts or Jupyter notebooks
- Analyze beam and beamline files programmatically
- Process simulation outputs and visualize results
- Automate parameter sweeps and optimization studies
Quick Start
import travelpy as tp
# Configure TRAVEL path (one-time setup, if needed)
tp.set_travel_directory("C:/Program Files (x86)/Path Manager/Travel")
# Run a simulation
result = tp.run_travel("beam.dat", "beamline.in")
# Display output files
result.display_output_files()
# Access simulation data with simple properties
avgout = result.avgout
rmsout = result.rmsout
# Analyze key results
print(f"Final transmission: {avgout.transmission.iloc[-1]:.1f}%")
print(f"Final beam energy: {avgout.ekin_avg.iloc[-1]*1000:.1f} MeV")
print(f"Horizontal emittance: {rmsout.emitt_norm_rms_x_xp.iloc[-1]*1e6:.2f} mm·mrad")
# Clean up output files when done
result.clean_outputs()
Installation
pip install travelpy
Requirements
- Python 3.10+
- TRAVEL simulation code (Windows only)
- NumPy, matplotlib
Examples and Tutorials
The examples/ folder contains comprehensive tutorials designed for newcomers to travelpy. These hands-on examples cover everything from basic simulation workflows to advanced features like parameter sweeps and parallel processing. Each example is self-contained with sample data and step-by-step explanations to help you get started quickly.
Documentation
Full documentation with examples and API reference coming soon.
Contributing
See CONTRIBUTING.md for development guidelines.
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file travelpy-0.1.0.tar.gz.
File metadata
- Download URL: travelpy-0.1.0.tar.gz
- Upload date:
- Size: 36.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b22cade93c3d52695a09b8a39a855a83323472581a755ae8cdba44d404a267b
|
|
| MD5 |
bdd9503230ffd4bae8e52d53a4a31571
|
|
| BLAKE2b-256 |
682a4508b8d5d8d27565acf06294f70273b39df410bafd0fa0770751ea1f1c63
|
File details
Details for the file travelpy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: travelpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59e68e920ebe058ac87fb2390a13004aa741bcf22b3e49175a92c87773d89525
|
|
| MD5 |
a54cc0bd721f2b6e7b13592d0d6abd74
|
|
| BLAKE2b-256 |
796f4a494d313b22a719f27c9b226bb4d106f85f30f52d1dc9f9a4eaf17ff651
|