feat(radiative): implement O(Z*alpha^2) correction and improve numerical stability

- Add Z (nuclear charge) and A (mass number) parameters to RadiativeCorrection
- Implement O(Z*alpha^2) finite nuclear size correction per Sirlin 1987:
  - Energy-dependent part: ln(m_p) - (5/12)*ln(2W) + 43/18
  - Nuclear-structure-dependent part: Delta_F(Z,A) from modified Gaussian model
- Add small-beta Taylor expansion for numerical stability at threshold (beta < 1e-6)
- Extract _safe_beta() and _safe_tanh_inv_beta_over_beta() helper methods
- Remove unused log_wright_bessel import
- Add 14 new tests: Z-dependence, numerical stability, A parameter coverage
- Update docs/06-radiative-corrections.md with new API usage examples

All 70 tests pass. 14 new tests in 3 new test classes.
This commit is contained in:
2026-04-30 07:18:02 +03:00
parent 6de2b9c01a
commit ed3fd5dc9d
3 changed files with 394 additions and 106 deletions
+19 -7
View File
@@ -100,12 +100,13 @@ Experimental branching ratios: $BR_{\beta\gamma} \sim 3\times 10^{-3}$ (neutron)
## Calculator Implementation
> [!tip] Code mapping
> Module: `beta_spectrum/components/radiative.py` → `RadiativeCorrection(W0, use_endpoint_resummation=True)` class
> Module: `beta_spectrum/components/radiative.py` → `RadiativeCorrection(W0, Z, A, use_endpoint_resummation)` class
>
> Implements outer radiative corrections per Hayen Eqs. (47)–(53):
> - Sirlin's $g(W_0,W)$ with `scipy.special.spence` for dilogarithm
> - Soft-photon resummation at endpoint via Eq. (53)
> - Order Zα² terms Δ₁ through Δ₄
> Implements outer radiative corrections per Sirlin (1967) and Sirlin (1987):
> - **O(α)**: Universal Sirlin function $g(W,W_0)$ with `scipy.special.spence` for dilogarithm
> - **O(Zα²)**: Finite nuclear size correction $\delta_2(Z,W)$ using modified Gaussian model
> - Soft-photon resummation at endpoint via Sirlin (1987) prescription
> - Small-beta Taylor expansion for numerical stability at threshold
> - Optional endpoint resummation flag
### API Usage
@@ -113,10 +114,21 @@ Experimental branching ratios: $BR_{\beta\gamma} \sim 3\times 10^{-3}$ (neutron)
```python
from beta_spectrum import RadiativeCorrection
# Light nucleus (tritium-like)
rad = RadiativeCorrection(
W0=1.02, # endpoint in m_e units
use_endpoint_resummation=True # handles endpoint divergence
W0=1.02,
Z=1,
use_endpoint_resummation=True
)
# Heavy nucleus (uranium) with nuclear model correction
rad = RadiativeCorrection(
W0=5.0,
Z=92,
A=238, # affects Delta_F nuclear model term
use_endpoint_resummation=True
)
values = rad(W_grid)
```