Commit Graph
43 Commits
Author SHA1 Message Date
unzhakov 6854bbff6e docs: update TODO.md with A2 completion and A4 next step
Mark detector response (A2) as complete. Set A4 (fitter routine for
experimental C(W) extraction) as the next immediate step.
2026-05-02 09:41:08 +03:00
unzhakov 272841f50d feat: add χ² fitter and C(W) shape factor extraction modules
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.
2026-05-02 09:40:38 +03:00
unzhakov 97aaddd86b feat: add notebook quality control pipeline with nbmake, auto-save hooks, and plot extraction 2026-05-02 02:25:24 +03:00
unzhakov 8b4545fe3e refactor: centralize all physical constants in constants.py, fix unit naming
- Add EULER_GAMMA, ME_KEV, R0_FM to constants.py
- Replace hardcoded 0.511, 0.5772..., 1.2 with imports from constants
- Fix T_to_W parameter name: T_kev -> T_MeV (it takes MeV, not keV)
- Remove duplicate ME_ME from spectrum.py (import ME_MEV from constants)
- Remove hardcoded r_0 from detector_response.py and radiative.py
- Update CONVENTIONS.md to reference correct constant names
2026-05-01 22:34:15 +03:00
unzhakov 6a671bfb8b docs: split conventions into CONVENTIONS.md — natural units, energy notation, SpectrumComponent design
- 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
2026-05-01 22:01:33 +03:00
unzhakov 5950659514 docs: add strategic development roadmap (TODO.md) 2026-05-01 19:27:51 +03:00
unzhakov bb5ce636ce style: fix black formatting in test_spectrum.py 2026-05-01 19:21:18 +03:00
unzhakov 5f99566a0e feat(detector): add detector response module, convolution, and integration
- Analytical detector response: gaussian, gaussian_tail, tikhonov models
- Low-energy tail modeling for charge collection effects
- Response matrix convolution via R^T · (Φ·ΔW)
- Declarative API: create_detector_from_config(), convolve_detector()
- BetaSpectrumAnalyzer.convolved_spectrum() for auto-convolution
- Integration tests: TestBetaSpectrumIntegration, TestDeclarativeDetectorResponse
- Documentation: docs/08-detector-response.md
2026-05-01 19:20:59 +03:00
unzhakov dac78987e6 chore: add mdformat and plugins to dev dependencies 2026-05-01 19:17:56 +03:00
unzhakov b974b68ce7 docs: update README structure and DEVELOPMENT.md setup instructions 2026-05-01 19:17:41 +03:00
unzhakov 1e678cfab7 docs: reformat radiative corrections doc to Obsidian YAML frontmatter 2026-05-01 19:17:26 +03:00
unzhakov 968cd6eff7 style: remove trailing blank lines in base.py and fermi.py 2026-05-01 19:17:08 +03:00
unzhakov c9a738baab chore(gitignore): remove notebooks and ipynb from gitignore
style: fix black formatting in test files (unused imports, assert reformatting)
2026-05-01 19:16:50 +03:00
unzhakov 21901aac70 Merge branch 'dev/radiative-correction-improvements' into main 2026-04-30 22:18:16 +03:00
unzhakov c99ce51487 fix(radiative): only apply endpoint resummation within delta_cut per spec Section 3.4
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.
2026-04-30 21:06:00 +03:00
unzhakov b2d8fbdd63 Add article summary
Hayen 2019 1-st forbidden transitions in the reactor anomaly
2026-04-30 18:19:36 +03:00
unzhakov ed3fd5dc9d 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.
2026-04-30 07:18:02 +03:00
unzhakov 6de2b9c01a Fix python venv in DEVELOPMENT.md 2026-04-29 22:51:07 +03:00
unzhakov 366be7d7c0 Create DEVELOPMENT.md
Containts rules and principles of basic development loop for the project
2026-04-29 22:39:36 +03:00
unzhakov 4185d2c77c Update docs for radiative correction
Added summaries for Sirlin's articles and spec file based on them.
2026-04-29 22:38:25 +03:00
unzhakov c40a6f7700 Update description and docs
Phase space upgrad (forbidden factors)
2026-04-29 22:35:56 +03:00
unzhakov 9ea2fdae33 Update .gitignore
no need to track ./docs/.obsidian/
2026-04-29 22:34:41 +03:00
unzhakov 4d508ca313 Add doc summary: 2050_Song 99TcMeasurement
Measurement of the 99Tc beta-spectrum and implications for g_v
2026-04-29 13:48:42 +03:00
unzhakov 0e9b20caa2 Fix deprecated np.maximum calls with 3 params 2026-04-28 11:38:31 +03:00
unzhakov 94402c7267 Add pandas runtime dependency 2026-04-28 11:34:41 +03:00
unzhakov 4c0fe493d8 Fix call parameter typo 2026-04-28 11:32:07 +03:00
unzhakov c682155b48 Remove agent artifact 2026-04-28 11:31:25 +03:00
unzhakov cb4c2d6235 Untrack deleted files 2026-04-27 20:43:40 +03:00
unzhakov 9ead290775 Documentation update
Added 2024 Paulsen article on Tc 99 measurements
2026-04-27 20:40:54 +03:00
unzhakov d8bc5e1b43 Move Hayen biblography to docs/refs/ 2026-04-27 17:47:13 +03:00
unzhakov f04f52b747 Update Phase Space calculation
Add support for proper calculation of phase space component based on the
transition type (allowed/Nth order forbidden).
2026-04-27 15:36:36 +03:00
unzhakov 85134396d6 Add reference extraction tool (extract_refs.py) and BibTeX from Hayen2017 PDF
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/.
2026-04-27 11:03:06 +03:00
unzhakov bce6e63663 Add pytest test suite (56 tests) for all spectrum components 2026-04-26 23:45:53 +03:00
unzhakov 8dac095d33 Add Obsidian knowledge base (docs/) and update README with docs structure 2026-04-26 22:41:42 +03:00
unzhakov 052a01980a Initial README
To be edited
2026-04-17 15:27:26 +03:00
unzhakov ee7e22104f Remove notebook directory
Stop tracking ipynb and notebooks directory.
Will later implement unit tests.
2026-04-17 15:21:00 +03:00
unzhakov 75ad14946d fix/Radiative correction
Implement correct resummation for high-energy electrons (near endpoint).
See pages 12-13 in Hayen 2017, eqs. 50, 53, 54
2026-04-17 12:53:26 +03:00
unzhakov 04c6a4b250 Output csv precision fix
Switched to 4 decimal digits.
2026-04-17 12:52:19 +03:00
unzhakov 31c276b9af Ignore Jupyter notebooks and their artifacts
Add directory ./notebooks and ipynb filetype to ignore list.
2026-04-17 12:48:54 +03:00
unzhakov 8c4d281fb5 Add data directory
Storage for data files used in calculations (extracted tables,
coefficients etc)
2026-04-15 18:12:53 +03:00
unzhakov 91f716c851 Version 0.1.2
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
2026-04-15 18:05:04 +03:00
unzhakov 0c5c53688d MVP Correction Implemented
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
2026-04-10 15:32:47 +03:00
unzhakov a5e1962fe2 Initial commit
Base modular structure (phase space, Fermi function)
Initial .gitignore
2026-04-02 15:38:37 +03:00