pith. machine review for the scientific record. sign in

arxiv: 2604.24838 · v1 · submitted 2026-04-27 · 🌌 astro-ph.CO · astro-ph.IM· cs.AI· hep-ph

Recognition: unknown

spectroxide: A code package for computing cosmic microwave background spectral distortions

Authors on Pith no claims yet

Pith reviewed 2026-05-08 01:44 UTC · model grok-4.3

classification 🌌 astro-ph.CO astro-ph.IMcs.AIhep-ph
keywords cosmic microwave backgroundspectral distortionsBoltzmann equationnumerical solverearly universeopen-source softwareAI-assisted developmentcosmology
0
0 comments X

The pith

A new open-source code package computes cosmic microwave background spectral distortions from arbitrary energy and photon injections.

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The paper presents a solver that evolves the photon distribution through the Boltzmann equation, incorporating Compton scattering along with double Compton emission and Bremsstrahlung, to track how the cosmic microwave background spectrum changes from redshift five million to the present. This matters because any heat or photon release in that era leaves a measurable distortion that encodes details of early-universe processes. The entire implementation, interface, and test suite were produced by an AI assistant under human physicist supervision, with domain experts identifying and correcting errors in dimensional factors and near-cancellations that automated checks missed. The authors validate the results against known analytic cases and existing Green's function tables and release the package for public use. The work also documents practical lessons for human oversight of AI-generated scientific code.

Core claim

We present a code package for computing cosmic microwave background spectral distortions in which all code, Python interface, and automated tests were written by an AI assistant under human physicist supervision. The solver evolves the photon Boltzmann equation under Compton scattering, double Compton emission, and Bremsstrahlung from redshift about five million to the present, computing spectral distortions from arbitrary heat and photon injection within this range, with no prior fully open-source equivalent available. Validation against analytic limits, published spectra, and Green's function tables supports its use.

What carries the argument

The numerical solver that evolves the photon Boltzmann equation under Compton scattering, double Compton emission, and Bremsstrahlung to obtain the resulting spectral distortions.

If this is right

  • Users can compute spectral distortions for any chosen heat or photon injection history between redshift five million and today.
  • The results agree with analytic limiting cases and with existing precomputed Green's function tables.
  • A Python interface makes the core solver accessible for integration into analysis workflows.
  • The open-source release fills the previous absence of a fully public code of this scope.
  • The documented development process illustrates how human review of physics details can complement AI code generation.

Where Pith is reading between the lines

These are editorial extensions of the paper, not claims the author makes directly.

  • The solver can now be applied to concrete early-universe models such as decaying particles or dark matter annihilation to predict specific distortion shapes.
  • The experience with missed numerical bugs suggests that future AI-assisted codes in cosmology will require focused human checks on unit consistency and cancellation accuracy.
  • Public availability may encourage direct comparisons with independent numerical methods or semi-analytic approximations for the same injection scenarios.
  • The approach could be repeated for related transport problems, such as neutrino or baryon Boltzmann solvers, to produce additional open tools more quickly.

Load-bearing premise

Validation against analytic limits, published spectra, and Green's function tables is sufficient to guarantee correct results for arbitrary, previously untested injection histories.

What would settle it

A mismatch between the code's output and an independent high-precision calculation for a specific injection history at an intermediate redshift where no prior comparison exists would show that the solver does not reliably handle general cases.

Figures

Figures reproduced from arXiv: 2604.24838 by Ethan Baker, Hongwan Liu, Siddharth Mishra-Sharma.

Figure 1
Figure 1. Figure 1: Distortion amplitudes as a function of injection redshift. Left: view at source ↗
Figure 2
Figure 2. Figure 2: Visibility functions derived from PDE spectra. view at source ↗
Figure 3
Figure 3. Figure 3: Intensity distortion ∆Iν per unit ∆ρ/ρ from single-burst energy in￾jection at six representative redshifts spanning the y-era through thermaliza￾tion. Each panel shows the spectroxide PDE solver (blue), analytical Green’s function (red dashed), and CosmoTherm [12, 38] (black); the unobservable temperature-shift component (∆T /T) Gbb(x) has not been subtracted from any curve, in order to show the growing Gb… view at source ↗
Figure 4
Figure 4. Figure 4: Spectral distortions ∆I [Jy/sr] for three dark matter scenarios, each with ∆ρ/ρ ∼ 10−5 : spectroxide PDE (solid colored) compared against CosmoTherm Green’s function convolution (dashed) and spectroxide PDE￾derived Green’s function convolution (dotted). Scenarios: decaying particle with ΓX = 1.1 × 10−10 s −1 and fX = 7.8 × 105 eV (blue); s-wave anni￾hilation with fann = 3.8 × 10−20 eV s−1 (orange); p-wave … view at source ↗
Figure 5
Figure 5. Figure 5: Stress tests with pathological injection histories: sinusoidal heating/- view at source ↗
Figure 6
Figure 6. Figure 6: Spectral distortions from monochromatic photon injection at three in view at source ↗
Figure 7
Figure 7. Figure 7: COBE/FIRAS 68% CL upper limits on monochromatic photon injec view at source ↗
Figure 8
Figure 8. Figure 8: FIRAS 95% CL upper limits on dark photon kinetic mixing view at source ↗
Figure 9
Figure 9. Figure 9: Iterative human–AI development workflow. The outer loop (top) cy view at source ↗
Figure 10
Figure 10. Figure 10: Energy conservation diagnostic: percentage deviation of recovered view at source ↗
Figure 11
Figure 11. Figure 11: Convergence of the IMEX solver. (a) Spectral view at source ↗
read the original abstract

We present spectroxide, a code package for computing cosmic microwave background spectral distortions in which all ${\sim}14{,}500$ lines of Rust code, Python interface, and ${\sim}400$ automated tests were written by an AI assistant (Claude Code) under human physicist supervision. The solver evolves the photon Boltzmann equation under Compton scattering, double Compton emission, and Bremsstrahlung from $z \sim 5 \times 10^6$ to the present, computing spectral distortions from arbitrary heat and photon injection within this redshift range. No fully open-source code of this kind is publicly available; we validate against analytic limits, published spectra, and publicly available precomputed Green's function tables. We document the development as a case study in AI-assisted scientific computing, highlighting how domain expertise caught physics bugs (incorrect dimensional prefactors, near-cancellation errors) that evaded the full automated test suite, and provide recommendations for best practices in human--AI collaborative development of scientific software. We make spectroxide publicly available on GitHub.

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, simulated authors' rebuttal, and a circularity audit. Tearing a paper down is the easy half of reading it; the pith above is the substance, this is the friction.

Referee Report

2 major / 2 minor

Summary. The manuscript presents spectroxide, a publicly available Rust-based code package (with Python interface) for numerically solving the photon Boltzmann equation to compute CMB spectral distortions. The solver incorporates Compton scattering, double Compton emission, and Bremsstrahlung, evolving from z ≈ 5×10^6 to the present and handling arbitrary heat and photon injection histories. All ~14,500 lines of code and ~400 automated tests were generated by an AI assistant (Claude Code) under human physicist supervision. Validation is reported against analytic limits, published spectra, and precomputed Green's function tables. The work also serves as a case study in AI-assisted scientific computing, documenting how human oversight identified physics bugs (e.g., dimensional prefactors and near-cancellations) missed by automated tests.

Significance. If the numerical implementation is shown to be robust, spectroxide would provide the first fully open-source, publicly documented tool for CMB distortion calculations with arbitrary injections, addressing a noted gap in the field and enabling reproducible studies of early-universe energy release. The detailed account of the AI development workflow, including specific examples of human intervention, offers a concrete, timely contribution to best practices in scientific software engineering that could be adopted more broadly in cosmology and computational physics.

major comments (2)
  1. [Abstract and validation description] The central claim that the code 'yields reliable distortions for arbitrary heat and photon injection' (abstract) is not adequately supported by the described validation. The checks are limited to analytic limits, published spectra, and Green's function tables; these exercise only linear superpositions and specific histories. No quantitative error metrics (e.g., maximum fractional deviation in μ or y across frequencies or redshifts) or tests for nonlinear/time-dependent injections outside the Green's function basis are reported, leaving open the possibility that bugs in the collision operator, redshift stepping, or frequency discretization remain undetected.
  2. [Solver description (implied)] The manuscript provides no details on the numerical implementation of the time-stepping scheme, frequency discretization, or convergence criteria used to evolve the Boltzmann equation from z ~ 5×10^6 to z=0. These choices are load-bearing for the accuracy of the solver under arbitrary injections and must be specified (with associated error budgets) before the reliability claim can be assessed.
minor comments (2)
  1. [Abstract] The abstract states that 'no fully open-source code of this kind is publicly available'; a brief comparison table to existing (even if not fully open) codes such as those referenced in the Green's function tables would strengthen the motivation.
  2. [Development and testing section] The ~400 automated tests are mentioned but not characterized (e.g., coverage of physical regimes, injection amplitudes, or redshift ranges); adding a short summary or table of test categories would improve transparency.

Simulated Author's Rebuttal

2 responses · 0 unresolved

We thank the referee for their careful reading and constructive comments, which highlight important areas for strengthening the manuscript's claims regarding the reliability of spectroxide for arbitrary injections. We address each major comment below and will make revisions where the current draft falls short of providing sufficient detail or evidence.

read point-by-point responses
  1. Referee: The central claim that the code 'yields reliable distortions for arbitrary heat and photon injection' (abstract) is not adequately supported by the described validation. The checks are limited to analytic limits, published spectra, and Green's function tables; these exercise only linear superpositions and specific histories. No quantitative error metrics (e.g., maximum fractional deviation in μ or y across frequencies or redshifts) or tests for nonlinear/time-dependent injections outside the Green's function basis are reported, leaving open the possibility that bugs in the collision operator, redshift stepping, or frequency discretization remain undetected.

    Authors: We agree that the validation as described in the manuscript is limited to linear regimes and does not include explicit quantitative metrics or nonlinear tests, which leaves the claim for fully arbitrary (including nonlinear) injections less strongly supported than it could be. While the Green's function comparisons validate the core operators and the solver implements the full nonlinear Boltzmann equation, we did not report maximum fractional deviations or dedicated nonlinear/time-dependent test cases. In the revised manuscript we will add a quantitative validation subsection with these metrics for representative nonlinear heat and photon injection histories, plus convergence tests outside the linear basis, to close this gap and better demonstrate robustness. revision: yes

  2. Referee: The manuscript provides no details on the numerical implementation of the time-stepping scheme, frequency discretization, or convergence criteria used to evolve the Boltzmann equation from z ~ 5×10^6 to z=0. These choices are load-bearing for the accuracy of the solver under arbitrary injections and must be specified (with associated error budgets) before the reliability claim can be assessed.

    Authors: We concur that the absence of these numerical details is a significant omission that prevents full assessment of the solver's accuracy for arbitrary injections. The current manuscript emphasizes the AI-assisted development workflow and high-level validation rather than implementation specifics. We will add a dedicated numerical methods section in the revision describing the time-stepping scheme (including adaptive criteria based on physical timescales), frequency discretization (grid type, spacing, and resolution), convergence criteria, and error budgets obtained from resolution studies, accompanied by supporting convergence plots for arbitrary injection examples. revision: yes

Circularity Check

0 steps flagged

No circularity: numerical code package with external validation

full rationale

The manuscript describes a software implementation of the photon Boltzmann equation solver under Compton, double Compton, and Bremsstrahlung processes. All central claims concern the code's ability to evolve the equation from z ~ 5e6 to today for arbitrary injections, supported by validation against analytic limits, published spectra, and external Green's function tables. No derivation chain exists that reduces a result to its own inputs by construction, no fitted parameters are relabeled as predictions, and no load-bearing uniqueness or ansatz is imported via self-citation. The work is self-contained against external benchmarks.

Axiom & Free-Parameter Ledger

0 free parameters · 0 axioms · 0 invented entities

The central claim rests on the numerical correctness of the Boltzmann solver and the adequacy of the chosen validation set; no free parameters, axioms, or invented entities are introduced beyond standard cosmology assumptions already present in the cited analytic limits and Green's functions.

pith-pipeline@v0.9.0 · 5492 in / 1284 out tokens · 53578 ms · 2026-05-08T01:44:23.801584+00:00 · methodology

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Reference graph

Works this paper leans on

71 extracted references · 62 canonical work pages

  1. [1]

    D. J. Fixsen, E. S. Cheng, J. M. Gales, J. C. Mather, R. A. Shafer and E. L. Wright, The cosmic microwave background spectrum from the full COBE FIRAS data set, Astrophys. J.473, 576 (1996), doi:10.1086/178173

  2. [2]

    D. J. Fixsen,The temperature of the cosmic microwave background, Astrophys. J. 707, 916 (2009), doi:10.1088/0004-637X/707/2/916

  3. [3]

    Chluba,Science with CMB spectral distortions, InProceedings of the XLIXth Rencontres de Moriond(2014), arXiv:1405.6938

    J. Chluba,Science with CMB spectral distortions, InProceedings of the XLIXth Rencontres de Moriond(2014), arXiv:1405.6938

  4. [4]

    Chlubaet al.,New horizons in cosmology with spectral distortions of the cosmic microwave background, Exp

    J. Chlubaet al.,New horizons in cosmology with spectral distortions of the cosmic microwave background, Exp. Astron.51, 1515 (2021), doi:10.1007/s10686-021-09729- 5, arXiv:1909.01593

  5. [5]

    R. A. Sunyaev and Y. B. Zel’dovich,Small-scale fluctuations of relic radiation, As- trophys. Space Sci.7, 3 (1970), doi:10.1007/BF00653471

  6. [6]

    Y. B. Zel’dovich and R. A. Sunyaev,The interaction of matter and radiation in a hot-model universe, Astrophys. Space Sci.4, 301 (1969), doi:10.1007/BF00661821

  7. [7]

    Silk,Cosmic black-body radiation and galaxy formation, Astrophys

    J. Silk,Cosmic black-body radiation and galaxy formation, Astrophys. J.151, 459 (1968), doi:10.1086/149449

  8. [8]

    R. A. Sunyaev and Y. B. Zel’dovich,The interaction of matter and radia- tion in the hot model of the universe, II, Astrophys. Space Sci.7, 20 (1970), doi:10.1007/BF00653472

  9. [9]

    R. A. Daly,Spectral distortions of the microwave background radiation resulting from the damping of pressure waves, Astrophys. J.371, 14 (1991), doi:10.1086/169866

  10. [10]

    Hu and J

    W. Hu and J. Silk,Thermalization and spectral distortions of the cosmic background radiation, Phys. Rev. D48, 485 (1993), doi:10.1103/PhysRevD.48.485

  11. [11]

    2012, MNRAS, 423, 600, doi: 10.1111/j.1365-2966.2012.20901.x

    J. Chluba, R. Khatri and R. A. Sunyaev,CMB at2×2order: the dissipation of primordial acoustic waves and the observable part of the associated energy release, Mon. Not. Roy. Astron. Soc.425, 1129 (2012), doi:10.1111/j.1365-2966.2012.21474.x

  12. [13]

    J. C. Hill, N. Battaglia, J. Chluba, S. Ferraro, E. Schaan and D. N. Spergel,Taking the universe’s temperature with spectral distortions of the cosmic microwave back- ground, Phys. Rev. Lett.115, 261301 (2015), doi:10.1103/PhysRevLett.115.261301, arXiv:1507.01583

  13. [14]

    McDonald, R

    P. McDonald, R. J. Scherrer and T. P. Walker,Cosmic microwave background con- straint on residual annihilations of relic particles, Phys. Rev. D63, 023001 (2000), doi:10.1103/PhysRevD.63.023001

  14. [15]

    Chen and M

    X. Chen and M. Kamionkowski,Particle decays during the cosmic dark ages, Phys. Rev. D70, 043502 (2004), doi:10.1103/PhysRevD.70.043502. 33 SciPost Physics Submission

  15. [16]

    Chluba,Distinguishing different scenarios of early energy release with spectral distortions of the cosmic microwave background, Mon

    J. Chluba,Distinguishing different scenarios of early energy release with spectral distortions of the cosmic microwave background, Mon. Not. Roy. Astron. Soc.436, 2232 (2013), doi:10.1093/mnras/stt1733

  16. [17]

    S. K. Acharya and R. Khatri,Rich structure of nonthermal relativistic CMB spectral distortions from high energy particle cascades at redshiftsz≲2×10 5, Phys. Rev. D 99, 043520 (2019), doi:10.1103/PhysRevD.99.043520, arXiv:1808.02897

  17. [18]

    S. K. Acharya and R. Khatri,New CMB spectral distortion constraints on de- caying dark matter with full evolution of electromagnetic cascades before recombi- nation, Phys. Rev. D99(12), 123510 (2019), doi:10.1103/PhysRevD.99.123510, arXiv:1903.04503

  18. [19]

    H. Liu, W. Qin, G. W. Ridgway and T. R. Slatyer,Exotic energy injection in the early Universe. II. CMB spectral distortions and constraints on light dark matter, Phys. Rev. D108(4), 043531 (2023), doi:10.1103/PhysRevD.108.043531, arXiv:2303.07370

  19. [20]

    Mastache, W

    A. Mirizzi, J. Redondo and G. Sigl,Microwave background constraints on mixing of photons with hidden photons, JCAP2009(03), 026 (2009), doi:10.1088/1475- 7516/2009/03/026

  20. [21]

    Caputo, H

    A. Caputo, H. Liu, S. Mishra-Sharma and J. T. Ruderman,Dark photon os- cillations in our inhomogeneous universe, Phys. Rev. Lett.125, 221303 (2020), doi:10.1103/PhysRevLett.125.221303, arXiv:2002.05165

  21. [22]

    Caputo, H

    A. Caputo, H. Liu, S. Mishra-Sharma and J. T. Ruderman,Modeling dark pho- ton oscillations in our inhomogeneous universe, Phys. Rev. D102, 103533 (2020), doi:10.1103/PhysRevD.102.103533, arXiv:2004.06733

  22. [23]

    Chluba, B

    J. Chluba, B. Cyr and M. C. Johnson,Revisiting dark photon constraints from CMB spectral distortions, Mon. Not. Roy. Astron. Soc.535, 1874 (2024), doi:10.1093/mnras/stae2464, arXiv:2409.12115

  23. [24]

    Arsenadze, A

    G. Arsenadze, A. Caputo, X. Gan, H. Liu and J. T. Ruderman,Shaping dark pho- ton spectral distortions, JHEP2025, 018 (2025), doi:10.1007/JHEP03(2025)018, arXiv:2409.12940

  24. [25]

    Tashiro, J

    H. Tashiro, J. Silk and D. J. E. Marsh,Constraints on primordial magnetic fields from CMB distortions in the axiverse, Phys. Rev. D88, 125024 (2013), doi:10.1103/PhysRevD.88.125024, arXiv:1308.0314

  25. [26]

    Mukherjee, R

    S. Mukherjee, R. Khatri and B. D. Wandelt,Polarized anisotropic spectral distor- tions of the CMB: Galactic and extragalactic constraints on photon-axion conversion, JCAP2018(04), 045 (2018), doi:10.1088/1475-7516/2018/04/045, arXiv:1801.09701

  26. [27]

    B. Cyr, J. Chluba and P. B. Gangrekalve Manoj,Revisiting constraints on resonant axion-photon conversions from CMB spectral distortions(2024), arXiv:2411.13701

  27. [28]

    Chluba,Green’s function of the cosmological thermalization problem – II

    J. Chluba,Green’s function of the cosmological thermalization problem – II. effect of photon injection and constraints, Mon. Not. Roy. Astron. Soc.454, 4182 (2015), doi:10.1093/mnras/stv2243

  28. [29]

    Bolliet, J

    B. Bolliet, J. Chluba and R. Battye,Spectral distortion constraints on photon injection from low-mass decaying particles, Mon. Not. Roy. Astron. Soc.507, 3148 (2021), doi:10.1093/mnras/stab1997. 34 SciPost Physics Submission

  29. [30]

    S. K. Acharya and R. Khatri,CMB spectral distortions constraints on primordial black holes, cosmic strings and long lived unstable particles revisited, JCAP2020(02), 010 (2020), doi:10.1088/1475-7516/2020/02/010, arXiv:1912.10995

  30. [31]

    B. Cyr, J. Chluba and S. K. Acharya,Constraints on the spectral signatures of superconducting cosmic strings, Mon. Not. R. Astron. Soc.525(2), 2632 (2023), doi:10.1093/mnras/stad2457, arXiv:2305.09816

  31. [32]

    Jedamzik, V

    K. Jedamzik, V. Katalini´ c and A. V. Olinto,Limit on primordial small-scale magnetic fields from cosmic microwave background distortions, Phys. Rev. Lett.85, 700 (2000), doi:10.1103/PhysRevLett.85.700, arXiv:astro-ph/9911100

  32. [33]

    M. A. Amin and D. Grin,Probing early-universe phase transitions with CMB spec- tral distortions, Phys. Rev. D90, 083529 (2014), doi:10.1103/PhysRevD.90.083529, arXiv:1405.1039

  33. [34]

    A. Kogutet al.,The primordial inflation explorer (PIXIE): A nulling polarime- ter for cosmic microwave background observations, JCAP2011(07), 025 (2011), doi:10.1088/1475-7516/2011/07/025

  34. [35]

    doi:10.48550/arXiv.2111.00246 , archiveprefix =

    B. Maffei, M. H. Abitbol, N. Aghanim, J. Aumont, E. Battistelli, J. Chluba, X. Coulon, P. De Bernardis, M. Douspis, J. Grainet al.,BISOU: a balloon project to measure the CMB spectral distortions, InProceedings of the 16th Marcel Grossmann Meeting (MG16)(2021), arXiv:2111.00246

  35. [36]

    Sabyr, C

    A. Sabyr, C. Sierra, J. C. Hill and J. J. McMahon,SPECTER: An instrument concept for CMB spectral distortion measurements with enhanced sensitivity, JCAP2025(10), 088 (2025), doi:10.1088/1475-7516/2025/10/088, arXiv:2409.12188

  36. [37]

    Coulon, B

    X. Coulon, B. Maffei and N. Aghanim,Towards measurements of CMB spectral distortions, EPJ Web Conf.293, 00012 (2024), doi:10.1051/epjconf/202429300012

  37. [38]

    Chluba,Green’s function of the cosmological thermalization problem, Mon

    J. Chluba,Green’s function of the cosmological thermalization problem, Mon. Not. Roy. Astron. Soc.434, 352 (2013), doi:10.1093/mnras/stt1025

  38. [39]

    The synergy between CMB spectral distortions and anisotropies,

    M. Lucca, N. Sch¨ oneberg, D. C. Hooper, J. Lesgourgues and J. Chluba,The synergy between CMB spectral distortions and anisotropies, JCAP2020(02), 026 (2020), doi:10.1088/1475-7516/2020/02/026

  39. [40]

    Anthropic,Claude code: An agentic coding tool, https://docs.anthropic.com/en/ docs/claude-code, Accessed: 2025 (2025)

  40. [41]

    Mishra-Sharma,Long-running Claude for scientific computing, https:// www.anthropic.com/research/long-running-Claude, Code: https://github.com/ smsharma/clax (2025)

    S. Mishra-Sharma,Long-running Claude for scientific computing, https:// www.anthropic.com/research/long-running-Claude, Code: https://github.com/ smsharma/clax (2025)

  41. [42]

    A. P. Lightman,Double compton emission in radiation dominated thermal plasmas, Astrophys. J.244, 392 (1981), doi:10.1086/158716

  42. [43]

    Chluba, S

    J. Chluba, S. Y. Sazonov and R. A. Sunyaev,The double Compton emissivity in a mildly relativistic thermal plasma within the soft photon limit, Astron. Astrophys. 468, 785 (2007), doi:10.1051/0004-6361:20066701

  43. [44]

    G. B. Rybicki and A. P. Lightman,Radiative Processes in Astrophysics, Wiley- Interscience, New York (1979). 35 SciPost Physics Submission

  44. [45]

    P. J. E. Peebles,Recombination of the primeval plasma, Astrophys. J.153, 1 (1968), doi:10.1086/149628

  45. [46]

    Y. B. Zel’dovich, V. G. Kurt and R. A. Syunyaev,Recombination of Hydrogen in the Hot Model of the Universe, Sov. Phys. JETP28, 146 (1969)

  46. [47]

    Chluba and D

    J. Chluba and D. Jeong,Teasing bits of information out of the CMB energy spec- trum, Mon. Not. R. Astron. Soc.438, 2065 (2014), doi:10.1093/mnras/stt2327, arXiv:1306.5751

  47. [48]

    Khatri and R

    R. Khatri and R. A. Sunyaev,Beyondyandµ: the shape of the CMB spectral distortions in the intermediate epoch,1.5×10 4 < z <2×10 5, JCAP2012(09), 016 (2012), doi:10.1088/1475-7516/2012/09/016

  48. [49]

    A. F. Illarionov and R. A. Sunyaev,Comptonization, characteristic radiation spectra, and the thermal balance of low-density plasma, Sov. Astron.18, 413 (1975)

  49. [50]

    Holdom, Phys

    B. Holdom,Two U(1)’s andϵcharge shifts, Phys. Lett. B166, 196 (1986), doi:10.1016/0370-2693(86)91377-8

  50. [51]

    Navaset al.),Phys

    S. Navaset al.,Review of particle physics, Phys. Rev. D110(3), 030001 (2024), doi:10.1103/PhysRevD.110.030001

  51. [52]

    L.-C. Tu, J. Luo and G. T. Gillies,The mass of the photon, Rept. Prog. Phys.68, 77 (2005), doi:10.1088/0034-4885/68/1/R02

  52. [53]

    Ehret et al

    K. Ehretet al.,New ALPS results on hidden-sector lightweights, Phys. Lett. B689, 149 (2010), doi:10.1016/j.physletb.2010.04.066, arXiv:1004.1313

  53. [54]

    Betzet al.,First results of the CERN resonant weakly interacting sub-ev particle search (CROWS), Phys

    M. Betzet al.,First results of the CERN resonant weakly interacting sub-ev particle search (CROWS), Phys. Rev. D88, 075014 (2013), doi:10.1103/PhysRevD.88.075014, arXiv:1310.8098

  54. [55]

    Romanenkoet al.,Search for dark photons with superconducting radio frequency cavities, Phys

    A. Romanenkoet al.,Search for dark photons with superconducting radio frequency cavities, Phys. Rev. Lett.130, 261801 (2023), doi:10.1103/PhysRevLett.130.261801, arXiv:2301.11512

  55. [56]

    C. A. J. O’Hare,AxionLimits, https://github.com/cajohare/AxionLimits, doi:10.5281/zenodo.3932430 (2020)

  56. [57]

    Seager, D

    S. Seager, D. D. Sasselov and D. Scott,A new calculation of the recombination epoch, Astrophys. J.523, L1 (1999), doi:10.1086/312250, arXiv:astro-ph/9909275

  57. [59]

    Ali-Ha¨ ımoud and C

    Y. Ali-Ha¨ ımoud and C. M. Hirata,HyRec: A fast and highly accurate primor- dial hydrogen and helium recombination code, Phys. Rev. D83, 043513 (2011), doi:10.1103/PhysRevD.83.043513

  58. [60]

    Chluba and Y

    J. Chluba and Y. Ali-Ha¨ ımoud,COSMOSPEC: Fast and detailed computation of the cosmological recombination radiation from hydrogen and helium, Mon. Not. Roy. Astron. Soc.456, 3494 (2016), doi:10.1093/mnras/stv2691. 36 SciPost Physics Submission

  59. [61]

    2001, MNRAS, 322, 2,

    J. Chluba,Could the cosmological recombination spectrum help us understand annihi- lating dark matter?, Mon. Not. R. Astron. Soc.402, 1195 (2010), doi:10.1111/j.1365- 2966.2009.15957.x, arXiv:0910.3663

  60. [62]

    T. R. Slatyer,Indirect dark matter signatures in the cosmic dark ages. II. Ionization, heating, and photon production from arbitrary energy injections, Phys. Rev. D93, 023521 (2016), doi:10.1103/PhysRevD.93.023521, arXiv:1506.03812

  61. [63]

    Chluba, A

    J. Chluba, A. Ravenni and B. Bolliet,Improved calculations of electron–ion bremsstrahlung Gaunt factors for astrophysical applications, Mon. Not. Roy. Astron. Soc.492, 177 (2020), doi:10.1093/mnras/stz3389

  62. [64]

    OpenAI,Codex, https://openai.com/index/openai-codex/, Cloud-based coding agent, released May 2025 (2025)

  63. [65]

    The Rust Project Developers,The Rust programming language(2024)

  64. [66]

    C. R. Harris, K. J. Millman, S. J. van der Waltet al.,Array programming with NumPy, Nature585, 357 (2020), doi:10.1038/s41586-020-2649-2

  65. [67]

    Oliphant, Matt Haberland, Tyler Reddy, David Cournapeau, Evgeni Burovski, Pearu Peterson, Warren Weckesser, Jonathan Bright, Stéfan J

    P. Virtanen, R. Gommers, T. E. Oliphantet al.,SciPy 1.0: fundamental al- gorithms for scientific computing in Python, Nature Methods17, 261 (2020), doi:10.1038/s41592-019-0686-2

  66. [68]

    J. D. Hunter,Matplotlib: A 2D graphics environment, Computing in Science & Engineering9(3), 90 (2007), doi:10.1109/MCSE.2007.55

  67. [69]

    A. S. Kompaneets,The establishment of thermal equilibrium between quanta and electrons, Sov. Phys. JETP4, 730 (1957)

  68. [70]

    Weymann,Diffusion approximation for a photon gas interacting with a plasma via the compton effect, Phys

    R. Weymann,Diffusion approximation for a photon gas interacting with a plasma via the compton effect, Phys. Fluids8, 2112 (1965), doi:10.1063/1.1761165

  69. [71]

    Crank and P

    J. Crank and P. Nicolson,A practical method for numerical evaluation of solutions of partial differential equations of the heat-conduction type, Proc. Cambridge Philos. Soc.43, 50 (1947), doi:10.1017/S0305004100023197

  70. [72]

    W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery,Numerical Recipes: The Art of Scientific Computing, Cambridge University Press, 3rd edn. (2007)

  71. [73]

    type": "single_burst

    F. Bianchini and G. Fabbian,CMB spectral distortions revisited: a new take onµ distortions and primordial non-Gaussianities from FIRAS data, Phys. Rev. D106, 063527 (2022), doi:10.1103/PhysRevD.106.063527, arXiv:2206.02762. A Scattering processes The spectral distortion problem reduces to evolving a photon occupation numbern(x) un- der three scattering pr...