Skip to content
TonyZhou729Public

About

Python+JAX package for differentiable CMB+BBN computations. See https://abcmb.readthedocs.io/en/latest/ for documentation.

Resources

Stars

16 stars

Watchers

2 watching

Forks

Repository files navigation

ABCMB

License: MIT arXiv Run Tests

Autodifferentiable Boltzmann solver for the CMB (ABCMB) is a Python+JAX package for differentiable computation of the Cosmic Microwave Background. ABCMB is complete to linear order in $\Lambda\rm{CDM}$ cosmology. It computes the matter and CMB power spectra and includes effects like lensing, massive neutrinos, and a state-of-the-art treatment of the physics of recombination through the companion code HyRex.

Installation

ABCMB is pip installable! Just run

pip install ABCMB

We recommend always doing so in a conda environment, preferably even a clean one.

If you'd like to clone the repo instead, after cloning you can run

pip install .

from the code directory.

Note that both methods of installing will automatically attempt to install JAX for CPU; to install for GPU, refer to the JAX documentation for a quick JAX installation guide.

Examples

We have included several pedagogical jupyter notebooks to walk you through how to get started with ABCMB in our example_notebooks folder. We suggest you start with ABCMB_basics to get a sense of how to run the code. If you'd like to add new physics to ABCMB, check out ABCMB_Fluids. If you'd like to run ABCMB with the Big Bang Nucleosynthesis (BBN) code LINX to do BBN+CMB joint analyses, check out ABCMB_with_LINX.

Issues

Please feel free to open an issue if something is amiss in ABCMB!

Citation

If you use ABCMB to publish scientific research, we suggest you cite

@article{abcmb,
   title={{ABCMB: A Python+JAX Package for the Cosmic Microwave Background Power Spectrum}},
   volume={2026},
   ISSN={1475-7516},
   url={http://dx.doi.org/10.1088/1475-7516/2026/08/078},
   DOI={10.1088/1475-7516/2026/08/078},
   number={08},
   journal={Journal of Cosmology and Astroparticle Physics},
   publisher={IOP Publishing},
   author={Zhou, Zilu and Giovanetti, Cara and Liu, Hongwan},
   year={2026},
   month=Aug, pages={078} }

About

Python+JAX package for differentiable CMB+BBN computations. See https://abcmb.readthedocs.io/en/latest/ for documentation.

Resources

Stars

16 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages