Skip to main content

reaction-kinematics

This is a Python library for calculating relativistic two-body nuclear reaction kinematics.

This package is designed for students and researchers working in nuclear and particle physics who need reliable relativistic kinematic calculations for reactions of the form:

projectile + target → ejectile + recoil

Features

This code can do:

  • Relativistic two-body kinematics
  • Center-of-mass and lab-frame quantities
  • Energy, angle, momentum, and velocity calculations
  • Support for multi-valued kinematic solutions

Installation

pip install reaction-kinematics

Documentation

https://det-lab.github.io/reaction-kinematics/

Syntax

# or equivalently:
# rxn = Reaction("3H(p,n)3He")
rxn = Reaction("p", "3H", "n", "3He")

rxn.kinematics_at_beam_energy_and_angle(beam_energy, angle_name, angle_value)

Parameters:

  • beam_energy : Beam kinetic energy (MeV by default)
  • angle_name : Independent variable (e.g. "theta3_lab", "theta4_lab", "theta_cm", "cos_theta_cm")
  • angle_value : Value at which to evaluate (degrees for angles by default)
  • angle_unit : Unit for angle_value"deg" (default), "rad", "mrad"
  • energy_unit : Unit for beam_energy"keV", "MeV" (default), "GeV", "TeV"

Example

vals = rxn.kinematics_at_beam_energy_and_angle(1.2, "theta4_lab", 10)
print(vals)

Output:

{
  'cos_theta_cm': [...],
  'theta_cm': [...],
  'theta3_lab': [...],
  'theta4_lab': [...],
  'energy3_lab': [0.3447, 0.0364],
  'energy4_lab': [...],
  'velocity3_lab': [0.025, 0.009],
  'velocity4_lab': [...],
  'momentum3_lab': [23.7, 8.2],
  'momentum4_lab': [...]
}

Multiple values in each list indicate multiple physical solutions.


Using Explicit Mass Values

rxn = Reaction(
    938.272,
    11177.928,
    938.272,
    11177.928,
    mass_unit="MeV"
)

Numerical Notes

  • Some kinematic variables are multi-valued.
  • Near kinematic extrema, solution branches may merge numerically.
  • The library automatically removes duplicate solutions within tolerance of 1e-6.

License

GPL-2.0 license


Contact

For questions, issues, or contributions, please open an issue on GitHub.


Project Docs

For how to install uv and Python, see installation.md.

For development workflows, see development.md.

For instructions on publishing to PyPI, see publishing.md.


This project was built from simple-modern-uv.

Download files

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

Source Distribution

reaction_kinematics-1.0.0.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

reaction_kinematics-1.0.0-py3-none-any.whl (45.5 kB view details)

Uploaded Python 3

File details

Details for the file reaction_kinematics-1.0.0.tar.gz.

File metadata

  • Download URL: reaction_kinematics-1.0.0.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.5

File hashes

Hashes for reaction_kinematics-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6708af0c6110a329469b9723bcfda4f28ec23c7a139a6788f5a3b48a5bf710df
MD5 166a67ab063a2a8fbc2c98132724d907
BLAKE2b-256 6733c317a47c1b080f982d7fb65a39533f09611b6d445cada90f03d7619e16a0

See more details on using hashes here.

File details

Details for the file reaction_kinematics-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reaction_kinematics-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ba374ec94a9687bdcf40d4780a73244e385f7eaf02363cb8fd14eb6adcd383d
MD5 77a9e0938abdf07f4a4bb09cc0045000
BLAKE2b-256 1e85410121dc7ae3c3e248653529effafac89a88132d6f1aba175d2df5f39b45

See more details on using hashes here.

Release history Release notifications | RSS feed

2.0.0

2 files

This release

1.0.0 This release

2 files

0.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

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