Skip to main content

A fast, differentiable, and extensible CMB code

Project description

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

@misc{abcmb,
      title={{ABCMB: A Python+JAX Package for the Cosmic Microwave Background Power Spectrum}}, 
      author={Zilu Zhou and Cara Giovanetti and Hongwan Liu},
      year={2026},
      eprint={2602.15104},
      archivePrefix={arXiv},
      primaryClass={astro-ph.CO},
      url={https://arxiv.org/abs/2602.15104}, 
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

abcmb-0.2.4.tar.gz (31.9 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

abcmb-0.2.4-py3-none-any.whl (32.9 MB view details)

Uploaded Python 3

File details

Details for the file abcmb-0.2.4.tar.gz.

File metadata

  • Download URL: abcmb-0.2.4.tar.gz
  • Upload date:
  • Size: 31.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for abcmb-0.2.4.tar.gz
Algorithm Hash digest
SHA256 b8d95f6a40af2b2aa88431fb372bec3d63c21babf2e0ea22c89dc64d54d1d53b
MD5 cdbca7736b42c4c0f4f2e789e59f8eae
BLAKE2b-256 7740da521a19cddde21b96b1eefedca22d48a8d623fba5eda6f374b8fca13ca6

See more details on using hashes here.

Provenance

The following attestation bundles were made for abcmb-0.2.4.tar.gz:

Publisher: pypi-publish.yml on TonyZhou729/ABCMB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file abcmb-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: abcmb-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 32.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for abcmb-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 711f6dfbda65f3ddb7e14bc2e6f9e6e49e1174cee1f9f6f87c9ddb6bcede448b
MD5 a397a42c1ff85772a1c76a3a8a8acc1c
BLAKE2b-256 a1446dde81db956a85a0837127a980877ff527d316296dae4f854f92e5c8fdd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for abcmb-0.2.4-py3-none-any.whl:

Publisher: pypi-publish.yml on TonyZhou729/ABCMB

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page