Folding package¶
The folding page documents the finite-range folding helpers and JLM/JLMB
parameterizations. The reusable analytic/tabulated density helpers live in
jitr.utils.density and are documented on the core API page.
Quadrature and folding helpers¶
ILDA quadrature and folding helpers.
- class jitr.folding.folding.ILDAFolder(r_max=20.0, n_quad=200)[source]¶
Bases:
objectQuadrature helper for ILDA Coulomb and Gaussian folding.
The folder owns a Gauss-Legendre grid on
[0, r_max]and exposes interpolation, integration, Coulomb, and Gaussian-folding helpers on that grid.- Variables:
r_q – Quadrature nodes on
[0, r_max]in fm.w_q – Quadrature weights on
[0, r_max]in fm.
- Parameters:
- e2 = 1.4399645472428273¶
- integrate(f_q)[source]¶
Integrate a quantity sampled on the quadrature grid.
- Parameters:
f_q (
TypeAliasType) – Function values sampled onself.r_q.- Return type:
- Returns:
Approximation to
∫_0^{r_max} f(r) dr.
- differentiate(f_q)[source]¶
Differentiate a quantity sampled on the quadrature grid.
Uses the Lagrange–Gauss-Legendre differentiation matrix (Baye 2015). Exact for polynomials of degree ≤
n_quad− 1; requires no grid-uniformity assumption.The off-diagonal elements are derived from the Lagrange-Legendre barycentric weights λ̃_j = √(r_j (r_max − r_j) w_j):
D_{ij} = (−1)^(i+j) λ̃_j / (λ̃_i (r_i − r_j)) i ≠ j
The diagonal is set by the row-sum condition ∑_j D_{ij} = 0, which holds because d/dr [∑_j l_j(r)] = 0 for any Lagrange basis.
- Z_from_density(rho_q)[source]¶
Compute the particle number implied by a spherical density.
- Parameters:
rho_q (
TypeAliasType) – Density values sampled onself.r_q.- Return type:
- Returns:
Value of
4π ∫ r² ρ(r) dr.
- rms_radius(rho_q)[source]¶
Compute the RMS radius of a spherical density.
- Parameters:
rho_q (
TypeAliasType) – Density values sampled onself.r_q.- Return type:
- Returns:
Root-mean-square radius in fm.
- Raises:
ValueError – If the density integrates to a non-positive norm.
- V_coulomb(rho_p_q, mode='density', R_C=None, include_exchange=False, r_out=None)[source]¶
Compute the Coulomb potential for a proton density.
- Parameters:
rho_p_q (
float|ndarray[tuple[Any,...],dtype[double]]) – Proton density sampled onself.r_q.mode (
str) – Coulomb model, either"density"or"uniform_sphere".R_C (
str|float|None) – Coulomb radius for the uniform-sphere mode, or"auto"to infer it from the RMS radius.include_exchange (
bool) – Whether to add the Slater exchange correction.r_out (
float|ndarray[tuple[Any,...],dtype[double]] |None) – Optional output grid in fm. Defaults toself.r_q.
- Return type:
- Returns:
Coulomb potential values in MeV sampled on
r_out.- Raises:
ValueError – If
modeis not recognized.
- gaussian_fold(U_q, t, r_out=None)[source]¶
Fold a radial quantity with a three-dimensional Gaussian.
- Parameters:
- Return type:
- Returns:
Folded values sampled on
r_out.- Raises:
ValueError – If
tis non-positive.
JLM parameterization¶
JLM and JLMB local-density optical-potential helpers.
- class jitr.folding.jlm.JLMParameterization(name, coeffs_A, coeffs_B, coeffs_C, coeffs_D, coeffs_F, coeffs_E_F, low_energy_E_F_offset=None, low_energy_E_F_coeffs=None, E_F_blend_energy=9.0, E_F_blend_width=2.0, D_damping=600.0, F_damping=1.0, local_jlm_real_mode='linearized_delta_c')[source]¶
Bases:
objectBundled coefficient and low-energy choices for JLM/JLMB helpers.
- Variables:
name – Human-readable identifier.
coeffs_A – Real isoscalar coefficient table.
coeffs_B – Real isovector coefficient table.
coeffs_C – Momentum-dependent mass coefficient table.
coeffs_D – Imaginary isoscalar coefficient table.
coeffs_F – Imaginary isovector coefficient table.
coeffs_E_F – High-energy Fermi-energy coefficients.
low_energy_E_F_offset – Constant term for the low-energy Fermi branch.
low_energy_E_F_coeffs – Density coefficients for the low-energy branch.
E_F_blend_energy – Logistic blend center in MeV.
E_F_blend_width – Logistic blend width in MeV.
D_damping – Imaginary isoscalar damping parameter in MeV².
F_damping – Imaginary isovector damping parameter in MeV.
local_jlm_real_mode – Real-part Coulomb treatment for
potential_JLM().
- Parameters:
- jitr.folding.jlm.resolve_parameterization(parameterization)[source]¶
Resolve a named or explicit JLM parameterization bundle.
- Return type:
- Parameters:
parameterization (str | JLMParameterization | None)
- jitr.folding.jlm.fermi_energy_MeV(rho_fm3, coeffs=array([-510.8, 3222., -6250.]), projectile_energy_MeV=None, low_energy_offset=None, low_energy_coeffs=None, blend_energy=9.0, blend_width=2.0)[source]¶
Return the local Fermi energy in MeV.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.coeffs (
ndarray[tuple[Any,...],dtype[double]]) – Polynomial coefficients for the high-energy JLM Fermi-energy fit.projectile_energy_MeV (
float|ndarray[tuple[Any,...],dtype[double]] |None) – Incident energy used for the low-energy branch blend. If omitted, only the high-energy branch is evaluated.low_energy_offset (
float|None) – Constant term for the low-energy branch.low_energy_coeffs (
ndarray[tuple[Any,...],dtype[double]] |None) – Density coefficients for the low-energy branch.blend_energy (
float) – Logistic blend center in MeV.blend_width (
float) – Logistic blend width in MeV.
- Return type:
- Returns:
Fermi energy evaluated at
rho_fm3.
- jitr.folding.jlm.V0(rho_fm3, E_MeV, coeffs=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]))[source]¶
Return the real isoscalar JLM self-energy component.
- Parameters:
- Return type:
- Returns:
Real isoscalar self-energy values in MeV.
- jitr.folding.jlm.W0(rho_fm3, E_MeV, E_F, coeffs=array([[-1.483e+03, 3.718e+01, -3.549e-01, 1.119e-03], [2.988e+04, -9.318e+02, 9.591e+00, -3.160e-02], [-2.128e+05, 7.209e+03, -7.752e+01, 2.611e-01], [5.125e+05, -1.796e+04, 1.980e+02, -6.753e-01]]), damping=600.0, damping_eps=1e-12)[source]¶
Return the imaginary isoscalar JLM self-energy component.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.E_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Projectile energy in MeV.E_F (
float|ndarray[tuple[Any,...],dtype[double]]) – Local Fermi energy in MeV.coeffs (
ndarray[tuple[Any,...],dtype[double]]) – Polynomial coefficients for the fit.damping (
float) – Imaginary-part damping parameter in MeV².damping_eps (
float) – Minimum energy denominator scale in MeV.
- Return type:
- Returns:
Imaginary isoscalar self-energy values in MeV.
- jitr.folding.jlm.m_tilde_over_m(rho_fm3, E_MeV, coeffs=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]))[source]¶
Return the JLM momentum-dependent mass ratio.
- Parameters:
- Return type:
- Returns:
Values of
m̃ / m.
- jitr.folding.jlm.eff_mass(rho_fm3, E_MeV, coeffs=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]))[source]¶
Return the JLM effective-mass ratio.
- Parameters:
- Return type:
- Returns:
Values of
m* / m.
- jitr.folding.jlm.E_mass(rho_fm3, E_MeV, coeffs_A=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]), coeffs_C=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]))[source]¶
Return the JLM energy-dependent mass ratio.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.E_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Projectile energy in MeV.coeffs_A (
ndarray[tuple[Any,...],dtype[double]]) – Coefficients for the real isoscalar fit.coeffs_C (
ndarray[tuple[Any,...],dtype[double]]) – Coefficients for the momentum-dependent mass fit.
- Return type:
- Returns:
Values of
m̄ / mobtained fromm* / m = (m̃ / m) (m̄ / m).
- jitr.folding.jlm.V1(rho_fm3, E_MeV, E_F, coeffs_B=array([[3.601e+02, -5.224e+00, 2.051e-02], [-2.691e+03, 5.130e+01, -2.470e-01], [7.733e+03, -1.717e+02, 8.846e-01]]), coeffs_C=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]))[source]¶
Return the real isovector JLM self-energy component.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.E_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Projectile energy in MeV.E_F (
float|ndarray[tuple[Any,...],dtype[double]]) – Local Fermi energy in MeV. Retained for API symmetry withW1(); the analytic form does not depend on it.coeffs_B (
ndarray[tuple[Any,...],dtype[double]]) – Polynomial coefficients for the real isovector fit.coeffs_C (
ndarray[tuple[Any,...],dtype[double]]) – Coefficients for the momentum-dependent mass fit.
- Return type:
- Returns:
Real isovector self-energy values in MeV.
- jitr.folding.jlm.W1(rho_fm3, E_MeV, E_F, coeffs_F=array([[5.461e+02, -1.120e+01, 1.065e-01, -3.541e-04], [-8.471e+03, 2.300e+02, -2.439e+00, 8.544e-03], [5.172e+04, -1.520e+03, 1.717e+01, -6.211e-02], [-1.140e+05, 3.543e+03, -4.169e+01, 1.537e-01]]), coeffs_A=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]), coeffs_C=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]), damping=1.0, damping_eps=1e-12)[source]¶
Return the imaginary isovector JLM self-energy component.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.E_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Projectile energy in MeV.E_F (
float|ndarray[tuple[Any,...],dtype[double]]) – Local Fermi energy in MeV.coeffs_F (
ndarray[tuple[Any,...],dtype[double]]) – Polynomial coefficients for the imaginary isovector fit.coeffs_A (
ndarray[tuple[Any,...],dtype[double]]) – Coefficients for the real isoscalar fit.coeffs_C (
ndarray[tuple[Any,...],dtype[double]]) – Coefficients for the momentum-dependent mass fit.damping (
float) – Imaginary-part damping parameter in MeV.damping_eps (
float) – Minimum absolute energy denominator scale in MeV.
- Return type:
- Returns:
Imaginary isovector self-energy values in MeV.
- jitr.folding.jlm.Delta_C(rho_fm3, E_MeV, V_C_MeV, coeffs_A=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]), linear=True)[source]¶
Return the real Coulomb correction for protons.
- Parameters:
rho_fm3 (
float|ndarray[tuple[Any,...],dtype[double]]) – Matter density in fm⁻³.E_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Projectile energy in MeV.V_C_MeV (
float|ndarray[tuple[Any,...],dtype[double]]) – Coulomb potential in MeV.coeffs_A (
ndarray[tuple[Any,...],dtype[double]]) – Polynomial coefficients for the real isoscalar fit.linear (
bool) – Whether to use the preferred linearized form from JLM 1977.
- Return type:
- Returns:
Coulomb correction values in MeV.
- jitr.folding.jlm.potential_JLM(rgrid, rho_grid, projectile, target, E, V_C=None, parameterization=None, coeffs_A=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]), coeffs_B=array([[3.601e+02, -5.224e+00, 2.051e-02], [-2.691e+03, 5.130e+01, -2.470e-01], [7.733e+03, -1.717e+02, 8.846e-01]]), coeffs_C=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]), coeffs_D=array([[-1.483e+03, 3.718e+01, -3.549e-01, 1.119e-03], [2.988e+04, -9.318e+02, 9.591e+00, -3.160e-02], [-2.128e+05, 7.209e+03, -7.752e+01, 2.611e-01], [5.125e+05, -1.796e+04, 1.980e+02, -6.753e-01]]), D_damping=600.0, coeffs_F=array([[5.461e+02, -1.120e+01, 1.065e-01, -3.541e-04], [-8.471e+03, 2.300e+02, -2.439e+00, 8.544e-03], [5.172e+04, -1.520e+03, 1.717e+01, -6.211e-02], [-1.140e+05, 3.543e+03, -4.169e+01, 1.537e-01]]), F_damping=1.0, coeffs_E_F=array([-510.8, 3222., -6250.]), r_out=None)[source]¶
Evaluate the local-density JLM optical potential.
- Parameters:
rgrid (
ndarray[tuple[Any,...],dtype[double]]) – Radial grid associated withrho_gridrho_grid (
ndarray[tuple[Any,...],dtype[double]]) – Matter-density values sampled onrgrid.projectile (
tuple[int,int]) – Projectile identifier,(1, 0)for neutrons or(1, 1)for protons.E (
float) – Projectile energy in MeV.V_C (
ndarray[tuple[Any,...],dtype[double]] |None) – Coulomb potential sampled onrgrid. Required for proton projectiles and ignored for neutrons.parameterization (
str|JLMParameterization|None) – Named kernel bundle.'original'preserves the existing paper-style implementation, while'talys'enables the revised TALYS-compatible low-energy handling.coeffs_A (
ndarray[tuple[Any,...],dtype[double]]) – Real isoscalar coefficient table.coeffs_B (
ndarray[tuple[Any,...],dtype[double]]) – Real isovector coefficient table.coeffs_C (
ndarray[tuple[Any,...],dtype[double]]) – Momentum-dependent mass coefficient table.coeffs_D (
ndarray[tuple[Any,...],dtype[double]]) – Imaginary isoscalar coefficient table.D_damping (
float) – Imaginary isoscalar damping parameter in MeV².coeffs_F (
ndarray[tuple[Any,...],dtype[double]]) – Imaginary isovector coefficient table.F_damping (
float) – Imaginary isovector damping parameter in MeV.coeffs_E_F (
ndarray[tuple[Any,...],dtype[double]]) – Fermi-energy coefficient vector.r_out (
ndarray[tuple[Any,...],dtype[double]] |None) – Optional output grid in fm
- Return type:
tuple[ndarray[tuple[Any,...],dtype[double]],ndarray[tuple[Any,...],dtype[double]]]- Returns:
Tuple of real and imaginary optical-potential arrays in MeV.
- Raises:
ValueError – If
projectileis not neutron or proton, or ifV_Cis missing or malformed for proton calls.
- jitr.folding.jlm.lambda_w0(E_MeV, mode=0)[source]¶
Return the JLMB imaginary-isoscalar normalization factor.
- Parameters:
- Return type:
- Returns:
Imaginary isoscalar normalization values.
- jitr.folding.jlm.lambda_w1(E_MeV, mode=0)[source]¶
Return the JLMB imaginary-isovector normalization factor.
The
modeparameter selects the TALYSjlmmodeprescription for thealamamplitude in the sigmoid correction to the 1.1 base value. Coefficients taken fromtalys/source/mom.f90(authoritative; the TALYS manual has typographical errors for modes 1 and 2).- Parameters:
- Return type:
- Returns:
Imaginary isovector normalization values.
- jitr.folding.jlm.lambda_vso(E_MeV)[source]¶
Return the JLMB real spin-orbit normalization depth.
From
talys/source/mom.f90:lvso = 40 + exp(-E*0.013)*130.
- jitr.folding.jlm.lambda_wso(E_MeV)[source]¶
Return the JLMB imaginary spin-orbit normalization depth.
From
talys/source/mom.f90:lwso = -0.2*(E - 20). Zero at E = 20 MeV.
- jitr.folding.jlm.spin_orbit_jlmb(r_q, rho_n_q, rho_p_q, projectile, r_out=None)[source]¶
Return the JLMB spin-orbit form factor F(r) = -½ (1/r) dρ_SO/dr.
Uses the Scheerbaum prescription (Nucl. Phys. A257, 77, 1976): the effective spin-orbit density up-weights the minority species:
neutron projectile:
ρ_SO = (2ρ_p + ρ_n) / 3proton projectile:
ρ_SO = (2ρ_n + ρ_p) / 3
The derivative dρ_SO/dr is evaluated via
CubicSplinefitted to the density values atr_q. The leading factor of −½ matches the TALYS/ECIS type-5 spin-orbit convention (Scheerbaum form stored with opposite sign and halved, confirmed numerically against ECIS output for n + ¹²⁰Sn at 10 MeV).The full complex spin-orbit potential is assembled by the caller as:
V_SO(r) = (lambda_vso(E) + 1j * lambda_wso(E)) * spin_orbit_jlmb(...)
and passed to
workspace.xs(spin_orbit_potential=...). jitr applies the L·S eigenvalue (l/2 for j=l+½, −(l+1)/2 for j=l−½) internally.- Parameters:
r_q (
ndarray[tuple[Any,...],dtype[double]]) – Radial grid in fm on whichrho_n_qandrho_p_qare sampled (e.g.ILDAFolder.r_q).rho_n_q (
ndarray[tuple[Any,...],dtype[double]]) – Neutron density onr_q, in fm⁻³.rho_p_q (
ndarray[tuple[Any,...],dtype[double]]) – Proton density onr_q, in fm⁻³.projectile (
tuple[int,int]) –(1, 0)for neutrons,(1, 1)for protons.r_out (
ndarray[tuple[Any,...],dtype[double]] |None) – Output radial grid in fm. Defaults tor_q.
- Return type:
- Returns:
Form factor F(r) sampled on
r_out, in fm⁻⁴.
- jitr.folding.jlm.potential_JLMB(folder, rho_n_q, rho_p_q, projectile, target, E, V_C=None, parameterization=None, coeffs_A=array([[-9.740e+02, 1.126e+01, -4.250e-02], [7.097e+03, -1.257e+02, 5.853e-01], [-1.953e+04, 4.180e+02, -2.054e+00]]), coeffs_B=array([[3.601e+02, -5.224e+00, 2.051e-02], [-2.691e+03, 5.130e+01, -2.470e-01], [7.733e+03, -1.717e+02, 8.846e-01]]), coeffs_C=array([[4.557e+00, -5.291e-03, 6.108e-06], [-2.051e+00, -4.906e-01, 1.812e-03], [-6.509e+01, 3.095e+00, -1.190e-02]]), coeffs_D=array([[-1.483e+03, 3.718e+01, -3.549e-01, 1.119e-03], [2.988e+04, -9.318e+02, 9.591e+00, -3.160e-02], [-2.128e+05, 7.209e+03, -7.752e+01, 2.611e-01], [5.125e+05, -1.796e+04, 1.980e+02, -6.753e-01]]), coeffs_F=array([[5.461e+02, -1.120e+01, 1.065e-01, -3.541e-04], [-8.471e+03, 2.300e+02, -2.439e+00, 8.544e-03], [5.172e+04, -1.520e+03, 1.717e+01, -6.211e-02], [-1.140e+05, 3.543e+03, -4.169e+01, 1.537e-01]]), coeffs_E_F=array([-510.8, 3222., -6250.]), D_damping=600.0, F_damping=1.0, lambda_V=1, lambda_W=1, lambda_V1=1, lambda_W1=1, t_r=1.25, t_i=1.35, r_out=None)[source]¶
Evaluate the finite-range JLMB optical potential.
- Parameters:
folder –
ILDAFolderproviding the folding grid.rho_n_q (
ndarray[tuple[Any,...],dtype[double]]) – Neutron density sampled onfolder.r_q.rho_p_q (
ndarray[tuple[Any,...],dtype[double]]) – Proton density sampled onfolder.r_q.projectile (
tuple[int,int]) – Projectile identifier,(1, 0)for neutrons or(1, 1)for protons.E (
float) – Projectile energy in MeV.V_C (
ndarray[tuple[Any,...],dtype[double]] |None) – Coulomb potential sampled onfolder.r_q. Required for proton projectiles and ignored for neutrons.parameterization (
str|JLMParameterization|None) – Named kernel bundle.'original'preserves the existing behavior, while'talys'enables the revised TALYS-compatible coefficients and low-energy Fermi-energy blend.coeffs_A (
ndarray[tuple[Any,...],dtype[double]]) – Real isoscalar coefficient table.coeffs_B (
ndarray[tuple[Any,...],dtype[double]]) – Real isovector coefficient table.coeffs_C (
ndarray[tuple[Any,...],dtype[double]]) – Momentum-dependent mass coefficient table.coeffs_D (
ndarray[tuple[Any,...],dtype[double]]) – Imaginary isoscalar coefficient table.coeffs_F (
ndarray[tuple[Any,...],dtype[double]]) – Imaginary isovector coefficient table.coeffs_E_F (
ndarray[tuple[Any,...],dtype[double]]) – Fermi-energy coefficient vector.D_damping (
float) – Imaginary isoscalar damping parameter in MeV².F_damping (
float) – Imaginary isovector damping parameter in MeV.lambda_V (
float) – Real isoscalar normalization.lambda_W (
float) – Imaginary isoscalar normalization.lambda_V1 (
float) – Real isovector normalization.lambda_W1 (
float) – Imaginary isovector normalization.t_r (
float) – Real-part Gaussian folding width in fm.t_i (
float) – Imaginary-part Gaussian folding width in fm.r_out (
ndarray[tuple[Any,...],dtype[double]] |None) – Optional output grid in fm.
- Return type:
tuple[ndarray[tuple[Any,...],dtype[double]],ndarray[tuple[Any,...],dtype[double]]]- Returns:
Tuple of folded real and imaginary optical-potential arrays in MeV.
- Raises:
ValueError – If
projectileis not neutron or proton, or ifV_Cis missing or malformed for proton calls.