/gtracr

A GPU-based Simulation for Tracking Cosmic Rays

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

gtracr - A GPU-accelerated Tracking simulation for Cosmic Rays

gtracr is a 3-D simulation package that simulates the trajectories of cosmic rays that arrive at a certain location on any location around the globe. The package uses the IGRF (International Geomagnetic Reference Field) model as the Earth's magnetic field and simulate trajectories using a 4th-order Runge Kutta numerical integration method.

The main components as well as the user interface of the package is written in Python, so using this package is straighforward with minimal steps for evaluation of a trajectory. The core of the package (that is, the evaluation of the geomagnetic field and the numerical integration) is written in C++, however, and as such each trajectory is optimized to perform evaluations at approximately 2000 iterations per second.

The code can further produce geomagnetic cutoff rigidities that either validates or invalidates a cosmic ray based on its trajectory, which is a key feature necessary to distinguish between allowed and forbidden trajectories.

Dependencies

  • Python 3 and above
  • NumPy
  • SciPy
  • datetime (for obtaining the current date)
  • tqdm

All such dependencies will be installed with the package.

Optional requirements

These packages are required to observe plots and test different trajectory cases:

  • matplotlib, plotly for plots
  • pytest, pytest-benchmark for testing

Documentation

Check out the documentation for more details on installing the package as well as instructions to start using this package with detailed examples.

Copyright and License

This project is under the BSD 3-Clause License. See LICENSE for more details.