Files
beta_shape_pnpi/beta_spectrum/components/phase_space.py
T
unzhakov a5e1962fe2 Initial commit
Base modular structure (phase space, Fermi function)
Initial .gitignore
2026-04-02 15:38:37 +03:00

20 lines
510 B
Python

# components/phase_space.py
import numpy as np
from ..base import SpectrumComponent
class PhaseSpace(SpectrumComponent):
def __init__(self, W0: float, m_nu: float = 0.0):
self.W0 = W0
self.m_nu = m_nu
def __call__(self, W: np.ndarray) -> np.ndarray:
p = np.sqrt(W**2 - 1.0)
Wv = self.W0 - W
# neutrino mass generalization
if self.m_nu == 0:
return p * W * Wv**2
else:
return p * W * Wv * np.sqrt(Wv**2 - self.m_nu**2)