Add CurveFitter with scipy least_squares, configurable loss functions
(soft_l1, huber, cauchy), profile likelihood, confidence intervals, and
goodness-of-fit metrics. Add CWExtractor for extracting shape factors
from beta spectra via Kurie analysis, parametrization fitting, and
g_V/g_A extraction. Includes 32 new tests (18 fitter + 14 CW extractor).
Bump version to 0.3.0.
- CONVENTIONS.md: natural units (m_e=hbar=c=1), W vs MeV energy representation,
conversion helpers, SpectrumComponent interface, physics-specific testing
- DEVELOPMENT.md: removed physics-specific 'What to Test' section,
references CONVENTIONS.md for physics testing guidelines
The resummation was previously applied to all energy points when the
flag was set, causing resummed and standard modes to differ everywhere.
Per spec, it should only replace C(beta)*ln(W0-W) with the resummed
power-law form when (W0-W) < delta_cut (~1e-3).
Adds delta_cut parameter (default 1e-3) and corrects the resummation
switch test to verify identical results far from endpoint.
- 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.
Local regex-based parser extracts journal, volume, pages for 83% of
references. Supports both local mode (--pdf paper.pdf) and LLM fallback
(--llm) via llama-server API. Includes 319-entry BibTeX in data/.
Implemented all planned corrections:
- finite-size e/m L0 and U
- atomic screening and exchange
- radiative (electron only so far)
Added plotter and csv_export
Add implementation for the basic set of spectrum components:
Primary
-------
- Phase Space
- Fermi Function
Corrections
-----------
- Atomic:
- Screening
- Atomic exchange
- E/M and finite size:
- Finite nucleus size and charge distribution
- Radiative