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.1.tar.gz (37.9 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.1-py3-none-any.whl (43.0 kB view details)

Uploaded Python 3

File details

Details for the file travelpy-0.1.1.tar.gz.

File metadata

  • Download URL: travelpy-0.1.1.tar.gz
  • Upload date:
  • Size: 37.9 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.1.tar.gz
Algorithm Hash digest
SHA256 2d83faa415d46b0b8889d385161ad5b31991319f575eb7db03d8f3fb86738c72
MD5 516e8e482ad055d8caf4ca039347b1e6
BLAKE2b-256 df4a9d3ec5f19ffd97b1f8cc9cd6abf144bc953add55f52bd24cade115728890

See more details on using hashes here.

File details

Details for the file travelpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: travelpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8b6f71875828b3688ea8afbc35a25260de0ac98594ded03d94ad36d6ebd7c312
MD5 c68f5d2ef229f652620ec2e323b82e14
BLAKE2b-256 cddc17c7b606eb5e33ac6e5fd71beac103d3344d994194b142c3e9a796645cc3

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