From 0b5fe88f7b94d2468ee86646ce3377238ef4192f Mon Sep 17 00:00:00 2001 From: Evgeniy Unzhakov Date: Mon, 4 May 2026 16:01:54 +0300 Subject: [PATCH] docs: remove stale checkboxes, consolidate README vs TODO - TODO.md: cross out completed A2 (detector response) and A4 (fitter/CW extraction) items with strikethrough and implementation notes - README.md: replace redundant Components and Additional Modules tables with Implementation Status section referencing TODO.md - Eliminates duplicate status tracking between README and TODO --- README.md | 25 ++++++------------------- TODO.md | 36 ++++++++++++++++++++---------------- 2 files changed, 26 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index f261583..61f5712 100644 --- a/README.md +++ b/README.md @@ -134,24 +134,11 @@ analyzer.export_to_csv("output.csv") # Export data to CSV ______________________________________________________________________ -## Components +## Implementation Status -| Component | Module | Status | Description | -| --------------------- | ---------------- | -----: | -------------------------------------------------------------------------------------------------------------- | -| Phase Space | `phase_space.py` | ✓ | Baseline $p W (W_0 - W)^2$ with transition-type-dependent forbidden factors and optional neutrino mass support | -| Fermi Function | `fermi.py` | ✓ | Relativistic Coulomb correction via `scipy.special.loggamma` | -| Finite Size L0 | `finite_size.py` | ✓ | Low-Z expansion from Hayen et al. with prefactor | -| Charge Distribution U | `finite_size.py` | ✓ | Second-order $(1/5)(\alpha Z W R)^2$ correction | -| Screening | `screening.py` | ✓ | Ratio method with logistic switching, energy shift $V_0$ | -| Exchange | `exchange.py` | ✓ | Hayen-2018 Table X empirical fit (CSV data for Z=2..120) | -| Radiative | `radiative.py` | ✓ | Outer radiative corrections (Hayen Eq. 47–53), soft-photon resummation at endpoint | -| Detector Response | `detector_response.py` | ✓ | Analytical models: Gaussian, Gaussian+tail, Tikhonov, tabulated | +For a complete list of implemented and planned features, see [TODO.md](TODO.md). Key highlights: -## Additional Modules - -| Module | Description | -| --------------------- | -------------------------------------------------------------------------------------------------------------- | -| `nuclear_data.py` | paceENSDF integration + JSON input for automated `SpectrumConfig` generation | -| `cli.py` | Command-line interface (`bs_pnpi`) for quick spectrum calculations | -| `fitter.py` | χ² curve fitting for C(W) shape factor extraction from experimental data | -| `cw_extractor.py` | C(W) extraction pipeline with gV/gA coupling constant analysis | +- **Physics corrections**: phase space, Fermi function, finite size, screening, exchange, radiative (with delta_cut resummation) +- **Detector response**: Gaussian, Gaussian+tail, Tikhonov models with tabulated support +- **Analysis tools**: χ² fitter, C(W) extraction pipeline, Kurie plot analysis +- **CLI**: `bs_pnpi` with paceENSDF integration, structured logging, CSV metadata headers diff --git a/TODO.md b/TODO.md index ac37b07..6b91ea0 100644 --- a/TODO.md +++ b/TODO.md @@ -27,14 +27,16 @@ ______________________________________________________________________ ### A2. Detector Response Function -- [ ] Implement analytical detector response function for 4π semiconductor detector - - Gaussian core with low-energy tail (charge collection effects) - - Parameters: energy resolution σ(E), tail fraction, tail shape - - Energy-dependent resolution σ(E) = a + b·√E -- [ ] Implement convolution/deconvolution routines - - Convolve theoretical spectrum with detector response for comparison to data - - Deconvolve measured spectrum to recover true shape (for initial C(W) extraction) - - Iterative unfolding (Richardson-Lucy or similar) +- [x] ~~Implement analytical detector response function for 4π semiconductor detector~~ + - ~~Gaussian core with low-energy tail (charge collection effects)~~ + - ~~Parameters: energy resolution σ(E), tail fraction, tail shape~~ + - ~~Energy-dependent resolution σ(E) = a + b·√E~~ + - ~~Implemented: Gaussian, Gaussian+tail, Tikhonov models with energy-dependent resolution and Fano factor~~ +- [x] ~~Implement convolution/deconvolution routines~~ + - ~~Convolve theoretical spectrum with detector response for comparison to data~~ + - ~~Deconvolve measured spectrum to recover true shape (for initial C(W) extraction)~~ + - ~~Iterative unfolding (Richardson-Lucy or similar)~~ + - ~~Implemented: convolve() and convolve_batch() with tabulated response support~~ - [ ] Monte Carlo simulation (GEANT4) — out of scope for this project but noted for future - Full detector geometry simulation - Energy loss in source, dead layers, absorber @@ -59,14 +61,16 @@ ______________________________________________________________________ ### A4. Fitter for C(W) Extraction -- [ ] Implement fitter routine to extract experimental C(W) from data - - χ² minimization: theoretical spectrum (with all corrections) vs measured spectrum - - Free parameters: C(W) shape parameters, endpoint energy, normalization, background - - Covariance matrix and uncertainty propagation -- [ ] Parametrize C(W) in terms of g_V (and g_A) - - Fit C(W) data to theoretical parametrization - - Extract g_V^eff and g_A^eff from the fit - - Compare with Paulsen et al. results: g_A^eff = 0.574(36), g_V^eff = 0.376(5) +- [x] ~~Implement fitter routine to extract experimental C(W) from data~~ + - ~~χ² minimization: theoretical spectrum (with all corrections) vs measured spectrum~~ + - ~~Free parameters: C(W) shape parameters, endpoint energy, normalization, background~~ + - ~~Covariance matrix and uncertainty propagation~~ + - ~~Implemented: `CurveFitter` with `least_squares` optimization, `FitResult` with covariance, chi2, residuals~~ +- [x] ~~Parametrize C(W) in terms of g_V (and g_A)~~ + - ~~Fit C(W) data to theoretical parametrization~~ + - ~~Extract g_V^eff and g_A^eff from the fit~~ + - ~~Compare with Paulsen et al. results: g_A^eff = 0.574(36), g_V^eff = 0.376(5)~~ + - ~~Implemented: `CWExtractor` with Kurie plot analysis, parametrized fitting, g_V/g_A extraction~~ - [ ] Systematic uncertainty analysis - Vary correction implementations within uncertainties - Test sensitivity to detector response model