Core package

The core page documents the package-level exports together with the utility modules that support kinematics and nuclear data, and shared helper functions.

Public package entry points for jitr.

Utilities

The jitr.utils package re-exports the most common helper modules and functions. The defining modules are documented below so objects only appear once in the API index.

Physical constants used throughout jitr.

Free-particle and Coulomb asymptotic solutions.

jitr.utils.free_solutions.Gamow_factor(l, eta)[source]

Return the Coulomb Gamow factor for angular momentum l.

Return type:

float

Parameters:
class jitr.utils.free_solutions.FreeAsymptotics[source]

Bases: object

Spherical-Bessel asymptotics for neutral-particle scattering.

static F(s, l, _eta=None)[source]

Return the regular free solution.

Return type:

double

Parameters:
static G(s, l, _eta=None)[source]

Return the irregular free solution.

Return type:

double

Parameters:
class jitr.utils.free_solutions.CoulombAsymptotics[source]

Bases: object

Coulomb asymptotic functions evaluated through mpmath.

static F(s, l, eta)[source]

Return the regular Coulomb function.

Return type:

cdouble

Parameters:
static G(s, l, eta)[source]

Return the irregular Coulomb function.

Return type:

cdouble

Parameters:
jitr.utils.free_solutions.H_plus(s, l, eta, asym=<class 'jitr.utils.free_solutions.CoulombAsymptotics'>)[source]

Return the outgoing Coulomb-Hankel function.

Return type:

complex

Parameters:
jitr.utils.free_solutions.H_minus(s, l, eta, asym=<class 'jitr.utils.free_solutions.CoulombAsymptotics'>)[source]

Return the incoming Coulomb-Hankel function.

Return type:

complex

Parameters:
jitr.utils.free_solutions.coulomb_func_deriv(func, s, l, eta)[source]

Differentiate Coulomb or Coulomb-Hankel functions using recurrence relations.

Return type:

complex

Parameters:
jitr.utils.free_solutions.H_plus_prime(s, l, eta, asym=<class 'jitr.utils.free_solutions.CoulombAsymptotics'>)[source]

Return the derivative of the outgoing Coulomb-Hankel function.

Return type:

complex

Parameters:
jitr.utils.free_solutions.H_minus_prime(s, l, eta, dx=1e-06, asym=<class 'jitr.utils.free_solutions.CoulombAsymptotics'>)[source]

Return the derivative of the incoming Coulomb-Hankel function.

Return type:

complex

Parameters:

Kinematic helpers for entrance, exit, and frame-conversion calculations.

class jitr.utils.kinematics.ChannelKinematics(Elab, Ecm, mu, k, eta)[source]

Bases: object

Kinematic quantities for a single reaction channel.

Variables:
  • Elab – Laboratory-frame kinetic energy in MeV.

  • Ecm – Center-of-mass kinetic energy in MeV.

  • mu – Reduced mass in MeV/c^2.

  • k – Center-of-mass wavenumber in fm^-1.

  • eta – Sommerfeld parameter.

Parameters:
Elab: float
Ecm: float
mu: float
k: float
eta: float
jitr.utils.kinematics.semi_relativistic_kinematics(mass_target, mass_projectile, Elab, Zz=0)[source]

Compute semi-relativistic entrance-channel kinematics.

Uses the approximation from Ingemarsson (1974) for a projectile scattering from a fixed target.

Parameters:
  • mass_target (float) – Target rest mass in MeV/c^2.

  • mass_projectile (float) – Projectile rest mass in MeV/c^2.

  • Elab (float) – Laboratory-frame kinetic energy in MeV.

  • Zz (int) – Product of projectile and target charges.

Return type:

ChannelKinematics

Returns:

A populated ChannelKinematics instance.

jitr.utils.kinematics.classical_kinematics(mass_target, mass_projectile, Elab, Zz=0)[source]

Compute non-relativistic kinematics from a laboratory energy.

Parameters:
  • mass_target (float) – Target rest mass in MeV/c^2.

  • mass_projectile (float) – Projectile rest mass in MeV/c^2.

  • Elab (float) – Laboratory-frame kinetic energy in MeV.

  • Zz (int) – Product of projectile and target charges.

Return type:

ChannelKinematics

Returns:

A populated ChannelKinematics instance.

jitr.utils.kinematics.classical_kinematics_cm(mass_target, mass_projectile, Ecm, Zz=0)[source]

Compute non-relativistic kinematics from a center-of-mass energy.

Parameters:
  • mass_target (float) – Target rest mass in MeV/c^2.

  • mass_projectile (float) – Projectile rest mass in MeV/c^2.

  • Ecm (float) – Center-of-mass kinetic energy in MeV.

  • Zz (int) – Product of projectile and target charges.

Return type:

ChannelKinematics

Returns:

A populated ChannelKinematics instance.

jitr.utils.kinematics.cm_to_lab_frame(angles_cm_deg, ma, mb, mc, md, E, Q)[source]

Convert center-of-mass angles to laboratory angles.

Parameters:
  • angles_cm_deg (TypeAliasType) – Input angles in degrees.

  • ma (float) – Mass of projectile a.

  • mb (float) – Mass of target b.

  • mc (float) – Mass of ejectile c.

  • md (float) – Mass of recoil d.

  • E (float) – Laboratory-frame energy in MeV.

  • Q (float) – Reaction Q-value in MeV.

Return type:

ndarray[tuple[Any, ...], dtype[double]]

Returns:

A NumPy array of laboratory-frame angles in degrees.

jitr.utils.kinematics.lab_to_cm_frame(angles_lab_deg, ma, mb, mc, md, E, Q)[source]

Convert laboratory angles to center-of-mass angles.

Parameters:
  • angles_lab_deg (TypeAliasType) – Input angles in degrees.

  • ma (float) – Mass of projectile a.

  • mb (float) – Mass of target b.

  • mc (float) – Mass of ejectile c.

  • md (float) – Mass of recoil d.

  • E (float) – Laboratory-frame energy in MeV.

  • Q (float) – Reaction Q-value in MeV.

Return type:

ndarray[tuple[Any, ...], dtype[double]]

Returns:

A NumPy array of center-of-mass angles in degrees.

General-purpose numerical helpers used across jitr.

jitr.utils.utils.complex_det(matrix)[source]

Return sqrt(det(A A^†)) for a complex matrix.

Return type:

cdouble

Parameters:

matrix (ndarray)

jitr.utils.utils.block(matrix, block_index, block_size)[source]

Extract a sub-block from a block-structured matrix.

Parameters:
  • matrix (ndarray) – Input matrix containing equally sized blocks.

  • block_index (tuple[int, int]) – (row, column) index of the desired block.

  • block_size (tuple[int, int]) – Shape of each block as (rows, columns).

Return type:

ndarray

Returns:

The requested submatrix view.

jitr.utils.utils.second_derivative_op(s, channel, interaction, args=())[source]

Evaluate the scaled radial Schrödinger operator.

Return type:

complex

Parameters:
jitr.utils.utils.schrodinger_eqn_ivp_order1(s, y, channel, interaction, args=())[source]

Convert the radial Schrödinger equation to a first-order system.

Return type:

list[complex]

Parameters:
jitr.utils.utils.smatrix(Rl, a, l, eta, asym=<class 'jitr.utils.free_solutions.CoulombAsymptotics'>)[source]

Compute an S-matrix element from a channel R-matrix value.

Return type:

complex

Parameters:
jitr.utils.utils.delta(Sl)[source]

Return the phase shift and attenuation in degrees.

Return type:

tuple[double, double]

Parameters:

Sl (complex)

jitr.utils.utils.eval_scaled_interaction(s, interaction, ch, args)[source]

Evaluate a local interaction in dimensionless coordinates.

Return type:

complex

Parameters:
jitr.utils.utils.eval_scaled_nonlocal_interaction(s, sp, interaction, ch, args)[source]

Evaluate a nonlocal interaction in dimensionless coordinates.

Return type:

complex

Parameters:
jitr.utils.utils.interaction_range(A, rA=1.2, r0=0.0)[source]

Estimate an interaction radius in femtometers.

Return type:

float

Parameters:
jitr.utils.utils.suggested_dimensionless_channel_radius(interaction_range, k)[source]

Suggest a dimensionless channel radius for a given interaction range.

The estimate leaves roughly one asymptotic wavelength beyond the interaction region.

Return type:

float

Parameters:
jitr.utils.utils.suggested_basis_size(a, zeros_per_node=5)[source]

Suggest an R-matrix basis size for a dimensionless channel radius.

Return type:

int

Parameters:

Mass-table accessors and simple derived nuclear-mass observables.

jitr.utils.mass.init_mass_db()[source]

Load the packaged mass tables into memory if needed.

Return type:

None

jitr.utils.mass.mass_db_row(A, Z)[source]

Return the matching mass-table row for a nuclide.

Return type:

DataFrame

Parameters:
jitr.utils.mass.mass_models()[source]

Return the list of available mass models.

Return type:

list[str]

jitr.utils.mass.mass_excess(A, Z, model='ame2020')[source]

Return the mass excess and uncertainty in MeV.

The uncertainty is None when the mass table does not include an uncertainty for the requested model, or when the nuclide is not found.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.mass(A, Z, **kwargs)[source]

Return the nuclear mass and uncertainty in MeV/c^2.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.binding_energy(A, Z, **kwargs)[source]

Return the total binding energy and uncertainty in MeV.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.neutron_separation_energy(A, Z, **kwargs)[source]

Return the one-neutron separation energy and uncertainty in MeV.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.proton_separation_energy(A, Z, **kwargs)[source]

Return the one-proton separation energy and uncertainty in MeV.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.neutron_fermi_energy(A, Z, **kwargs)[source]

Return the neutron Fermi-energy estimate and uncertainty in MeV.

Return type:

tuple[float, float | None]

Parameters:
jitr.utils.mass.proton_fermi_energy(A, Z, **kwargs)[source]

Return the proton Fermi-energy estimate and uncertainty in MeV.

Return type:

tuple[float, float | None]

Parameters: