Skip to main content

Calculable R-matrix solver for quantum scattering using just-in-time compilation for performance.

Project description

Python package PyPI publish

drawing

just-in-time R-Matrix (jitR)

A nuclear reaction toolkit, production ready for calibration and uncertainty-quantification, featuring:

  • fast calculable $\mathcal{R}$-matrix solver for parametric reaction models
  • built in uncertainty-quantified optical potentials
  • built in nuclear data
  • plenty of examples demonstrating the propagation of uncertainties into reaction observables and model calibration

Give your nuclear reaction UQ workflow a caffeine-kick with jitR!

quick start

 pip install jitr

The release versions of the package are hosted at pypi.org/project/jitr/.

examples and tutorials

Various example scripts live in examples/. Tutorials live in examples/notebooks/.

There are some additional requirements to run the examples. Once you've cloned the repo, from the main directory, run:

pip install -r examples/notebooks/requirements.txt

Then, you can run the notebooks. In particular, check out:

description

A framework for uncertainty-quantification of nuclear reaction observables using parametric reaction models. Consider a local coordinate-space potential $V(r;\theta)$ that is a function of some parameters $\theta$. Just write it like so:

def V(r,*theta):
  a,b,c,... = theta
  # calculate and return potential at radial coordinate r as a function of parameters a,b,c,...

Then, you can pass it along with many samples of $\theta$ into jitR to calculate many samples of the corresponding cross sections for your system and reaction of interest! The reaction observables jitR can calculate are represented as Workspace instances, and live in src/jitr/xs/.

Under the hood, jitR solves the radial Bloch-Shrödinger equation in the continuum using the calculable $\mathcal{R}$-Matrix method on a Lagrange-Legendre mesh. It is fast because it gives users the tools to precompute everything that they can for a system and reaction of interest, so given a single parameter sample, the minimal amount of compute is required to spit a cross section back out. For this reason, jitR is really suited to calculating an ensemble of observables for many parameter samples. Additionally, jitR relies on vectorized operations from numpy, as well as just-in-time (JIT) compilation from numba for the small subset of performance-critical code.

The theory generally follows:

with the primary difference being that this code uses the energy-scaled version of the Bloch-Shrödinger equation, with dimensionless domain, $s = k_0 r$, where $r$ is the radial coordinate and $k_0$ is the entrance channel wavenumber.

contributing, developing, and testing

To set up the repository for contributing, testing, access to non-release branches, access to the examples and notebooks, etc., clone the repository and install locally:

git clone git@github.com:beykyle/jitr.git
pip install -r ./jitr/requirements.txt
pip install -e ./jitr

then run the unit tests:

pytest jitr

The notebooks in examples/notebooks/, aside from being demos, also can be used as tests:

pip install -r examples/notebooks/requirements.txt
pytest --nbval-lax examples/notebooks/

Feel free to fork and make a pull request if you have things to contribute. There are many open issues, feel free to add more.

BAND

This package is part of the BAND Framework

citation

@software{Beyer_JITR_2024,
author = {Beyer, Kyle},
license = {BSD-3-Clause},
month = oct,
title = {{JITR}},
url = {https://github.com/beykyle/jitr},
version = {1.3.0},
year = {2024}
}

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

jitr-2.6.tar.gz (11.0 MB view details)

Uploaded Source

Built Distribution

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

jitr-2.6-py3-none-any.whl (4.6 MB view details)

Uploaded Python 3

File details

Details for the file jitr-2.6.tar.gz.

File metadata

  • Download URL: jitr-2.6.tar.gz
  • Upload date:
  • Size: 11.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jitr-2.6.tar.gz
Algorithm Hash digest
SHA256 5e2fd3c447950805111cda08cee17c4eecf724f503c6a60afc8e6cff74945748
MD5 5a9753945286cc089253892a9211a78c
BLAKE2b-256 7d33553c40f6448d1da915b3c2ca9f452d5de5f9ea6be08ce5794a5328526065

See more details on using hashes here.

File details

Details for the file jitr-2.6-py3-none-any.whl.

File metadata

  • Download URL: jitr-2.6-py3-none-any.whl
  • Upload date:
  • Size: 4.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for jitr-2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 3dc794d926a20e03a18ff61f9ae0f5f9f95c218ea5ff8d802c662a68066b2cdf
MD5 772b829de0af2a03b8ffbf71ff178ed0
BLAKE2b-256 1f49b92b0fdad50cd4637b9c10d65c3c84894bbe6c2d02da8d1235c93921425a

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