Skip to main content

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


Download files

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

Source Distribution

travelpy-0.1.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

travelpy-0.1.0-py3-none-any.whl (40.8 kB view details)

Uploaded Python 3

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

Hashes for travelpy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8b22cade93c3d52695a09b8a39a855a83323472581a755ae8cdba44d404a267b
MD5 bdd9503230ffd4bae8e52d53a4a31571
BLAKE2b-256 682a4508b8d5d8d27565acf06294f70273b39df410bafd0fa0770751ea1f1c63

See more details on using hashes here.

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

Hashes for travelpy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59e68e920ebe058ac87fb2390a13004aa741bcf22b3e49175a92c87773d89525
MD5 a54cc0bd721f2b6e7b13592d0d6abd74
BLAKE2b-256 796f4a494d313b22a719f27c9b226bb4d106f85f30f52d1dc9f9a4eaf17ff651

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