Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
5eeddb2
add rxn functionality for angle frame transormation
beykyle Aug 17, 2025
9df40d7
add pytest
beykyle Aug 26, 2025
57f4e56
properly add nuclei
beykyle Aug 27, 2025
afefd6a
Merge branch 'main' into wip-elm
beykyle Aug 27, 2025
6ff8366
formatting
beykyle Oct 7, 2025
25598c7
Apply automatic changes
beykyle Oct 7, 2025
555d3e2
add nb demo
beykyle Dec 17, 2025
36d8115
typos in nb
beykyle Dec 17, 2025
6a9426e
update nb
beykyle Dec 17, 2025
1badcfe
add manual sys spe demo
beykyle Jan 6, 2026
ae1f18b
add spin-rotation param calculation
beykyle Jan 14, 2026
192bac4
add spin-rotation param calculation
beykyle Jan 14, 2026
e53365e
formatting
beykyle Jan 28, 2026
3dcf466
Merge branch 'wip-elm' of github.com:beykyle/jitr into wip-elm
beykyle Jan 28, 2026
c411443
fix bug in xs calculation
beykyle Feb 5, 2026
6152711
fix minus sign in wlh
beykyle Feb 5, 2026
80bf707
Apply automatic changes
beykyle Feb 5, 2026
2a85470
update sph harm
beykyle Feb 23, 2026
eb11554
Merge branch 'wip-elm' of github.com:beykyle/jitr into wip-elm
beykyle Feb 25, 2026
b265299
explicitly handle matrix dims
beykyle Feb 26, 2026
d6fa5c8
compat w/ scipy >1.17, plus add notebooks to test suite
beykyle Feb 27, 2026
0a7f7f8
Apply automatic changes
beykyle Feb 27, 2026
a985454
flake8
beykyle Feb 27, 2026
6fed649
Merge branch 'wip-elm' of github.com:beykyle/jitr into wip-elm
beykyle Feb 27, 2026
bd772a6
flake8
beykyle Feb 27, 2026
46ea472
flake8 again
beykyle Feb 27, 2026
bc51bfc
update kernel
beykyle Feb 27, 2026
0ad9424
update nbs
beykyle Feb 28, 2026
91bc013
remove checks
beykyle Feb 28, 2026
3518976
add more modern py versions to actions
beykyle Feb 28, 2026
26a2ae9
typo
beykyle Feb 28, 2026
a6061f3
Initial plan
Copilot Feb 28, 2026
edac924
Add ValueError guards in to_lab_frame() and to_cm_frame()
Copilot Feb 28, 2026
deaef0f
Merge pull request #74 from beykyle/copilot/sub-pr-73
beykyle Feb 28, 2026
e2bf6c1
update comment
beykyle Feb 28, 2026
d28175e
Merge branch 'wip-elm' of github.com:beykyle/jitr into wip-elm
beykyle Feb 28, 2026
4037f45
add 3.14
beykyle Feb 28, 2026
9b1dc28
remove defaults
beykyle Feb 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -62,3 +62,8 @@ jobs:
- name: Test with pytest
run: |
pytest

- name: run jupyter notebook tests
run: |
pip install -r examples/notebooks/requirements.txt
pytest --nbval-lax examples/notebooks/ -v
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# virtual docs
.virtual_documents/

#slurm files
*.slurm

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ The release versions of the package are hosted at [pypi.org/project/jitr/](https

Various example scripts live in [`examples/`](https://github.com/beykyle/jitr/tree/main/examples). Tutorials live in [`examples/notebooks/`](https://github.com/beykyle/jitr/tree/main/examples/notebooks).

In particular, check out:
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:
- [`examples/notebooks/reactions.ipynb`](https://github.com/beykyle/jitr/tree/main/examples/notebooks/reactions.ipynb) which demonstrates the use of the `reactions` submodule
- [`examples/notebooks/builtin_omps_uq.ipynb`](https://github.com/beykyle/jitr/tree/main/examples/notebooks/builtin_omps_uq.ipynb) to see how to use the built-in uncertainty-quantified optical model potentials to propagate uncertainties into reaction observables

Expand Down Expand Up @@ -63,12 +69,18 @@ pip install -r ./jitr/requirements.txt
pip install -e ./jitr
```

then run the tests:
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](https://github.com/beykyle/jitr/issues), feel free to add more.


Expand Down
235 changes: 235 additions & 0 deletions assets/jitr_logo.ipynb

Large diffs are not rendered by default.

11 changes: 5 additions & 6 deletions examples/coupled.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import numpy as np
from matplotlib import pyplot as plt

from jitr import rmatrix
from jitr.reactions import ProjectileTargetSystem, wavefunction
from jitr.optical_potentials.potential_forms import coulomb_charged_sphere as coul
from jitr.optical_potentials.potential_forms import (
woods_saxon_potential as ws,
surface_peaked_gaussian_potential as spg,
coulomb_charged_sphere as coul,
)
from jitr.utils import complex_det, kinematics, mass, constants
from jitr.optical_potentials.potential_forms import woods_saxon_potential as ws
from jitr.reactions import ProjectileTargetSystem, wavefunction
from jitr.utils import complex_det, constants, kinematics, mass
from matplotlib import pyplot as plt


def interaction_3level(r, V, R0, a0, Zz, coupling_matrix):
Expand Down
16 changes: 6 additions & 10 deletions examples/local.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import numpy as np
from matplotlib import pyplot as plt
from scipy.integrate import solve_ivp
from numba import njit

from jitr import rmatrix
from jitr.reactions import ProjectileTargetSystem, make_channel_data, wavefunction
from jitr.optical_potentials.potential_forms import (
woods_saxon_potential,
coulomb_charged_sphere,
woods_saxon_potential,
)
from jitr.utils import delta, smatrix, schrodinger_eqn_ivp_order1, kinematics
from jitr.reactions import ProjectileTargetSystem, make_channel_data, wavefunction
from jitr.utils import delta, kinematics, schrodinger_eqn_ivp_order1, smatrix
from matplotlib import pyplot as plt
from scipy.integrate import solve_ivp

# target (A,Z)
Ca48 = (48, 20)
Expand All @@ -21,7 +19,7 @@


def interaction(r, *params):
(V0, W0, R0, a0, zz, RC) = params
V0, W0, R0, a0, zz, RC = params
return -woods_saxon_potential(r, V0, W0, R0, a0) + coulomb_charged_sphere(r, zz, RC)


Expand All @@ -31,7 +29,6 @@ def local_interaction_example():
"""
Elab = 14.1
nodes_within_radius = 3
n_partial_waves = 1

sys = ProjectileTargetSystem(
channel_radius=2 * np.pi * nodes_within_radius,
Expand Down Expand Up @@ -282,7 +279,6 @@ def rmse_RK_LM():

error_matrix[l, i] = np.absolute(S_rk - S_lm[0, 0]) / np.absolute(S_rk)

lines = []
for l in sys.l:
plt.plot(egrid, 100 * error_matrix[l, :], label=r"$l = %d$" % l)

Expand Down
6 changes: 1 addition & 5 deletions examples/nonlocal.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import numpy as np

from jitr import rmatrix

from jitr.reactions import ProjectileTargetSystem

from jitr.optical_potentials.potential_forms import (
yamaguchi_potential,
yamaguchi_swave_delta,
)

from jitr.reactions import ProjectileTargetSystem
from jitr.utils.constants import HBARC


Expand Down
Loading