Initial commit

Base modular structure (phase space, Fermi function)
Initial .gitignore
This commit is contained in:
2026-04-02 15:38:37 +03:00
commit a5e1962fe2
16 changed files with 491 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# 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)