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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Baker, Ethan, Liu, Hongwan, Mishra-Sharma, Siddharth
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915961929465856
author Baker, Ethan
Liu, Hongwan
Mishra-Sharma, Siddharth
author_facet Baker, Ethan
Liu, Hongwan
Mishra-Sharma, Siddharth
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2604_24838
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle spectroxide: A code package for computing cosmic microwave background spectral distortions
Baker, Ethan
Liu, Hongwan
Mishra-Sharma, Siddharth
Cosmology and Nongalactic Astrophysics
Instrumentation and Methods for Astrophysics
Artificial Intelligence
High Energy Physics - Phenomenology
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.
title spectroxide: A code package for computing cosmic microwave background spectral distortions
topic Cosmology and Nongalactic Astrophysics
Instrumentation and Methods for Astrophysics
Artificial Intelligence
High Energy Physics - Phenomenology
url https://arxiv.org/abs/2604.24838