21CMMC
An extensible MCMC framework for 21cmFAST.
This code uses semantic versioning, though this will strictly begin when v1.0.0 is officially shipped.
Free software: MIT license
Features
Seamless integration with emcee-based MCMC.
Supports the MultiNest sampler.
Supports the zeus sampler.
MCMC is easily extensible via the addition of different likelihoods using the same underlying data.
Scalability
This plot shows the number of test models (see details here) performed using the MultiNest sampler as a function of thread number, illustrating an almost ideal scalability where #model per human hour scales linearly with #thread. There are three runs for each thread number, which are indicated by the filled circles with errorbar. The double sided arrows show the relative (w.r.t. the 24-thread case) loss when scaling up the calculation. Note that a typical inference study, working with more complex models and therefore performing much fewer models per human hour, is expected to remain the same level of scalability.
Documentation
Acknowledging
If you find 21CMMC useful in your research please cite at least one of the following (whichever is most suitable to you):
Bradley Greig and Andrei Mesinger, “21CMMC: an MCMC analysis tool enabling astrophysical parameter studies of the cosmic 21 cm signal”, Monthly Notices of the Royal Astronomical Society, Volume 449, Issue 4, p.4246-4263 (2015), https://doi.org/10.1093/mnras/stv571
Bradley Greig and Andrei Mesinger, “Simultaneously constraining the astrophysics of reionization and the epoch of heating with 21CMMC”, Monthly Notices of the Royal Astronomical Society, Volume 472, Issue 3, p.2651-2669 (2017), https://doi.org/10.1093/mnras/stx2118
Bradley Greig and Andrei Mesinger, “21CMMC with a 3D light-cone: the impact of the co-evolution approximation on the astrophysics of reionization and cosmic dawn”, Monthly Notices of the Royal Astronomical Society, Volume 477, Issue 3, p.3217-3229 (2018), https://doi.org/10.1093/mnras/sty796
Jaehong Park et al., “Inferring the astrophysics of reionization and cosmic dawn from galaxy luminosity functions and the 21-cm signal”, Monthly Notices of the Royal Astronomical Society, Volume 484, Issue 1, p.933-949 (2018), https://doi.org/10.1093/mnras/stz032
Metadata
Release files for 21cmMC 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| 21cmmc-1.0.0.tar.gz | 1.5 MB | With provenance | Details for 21cmmc-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 21cmmc-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for 21cmmc-1.0.0-py3-none-any.whl |
Total release size: 1.7 MB
Release files / 21cmmc-1.0.0.tar.gz
| Download URL | 21cmmc-1.0.0.tar.gz |
|---|---|
| Size | 1.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c64b5fd883daced10a8b55b006ec65c043d7ec8f91bf2151c09e27e511c617d
|
|
BLAKE2b-256 checksum How to use checksums |
51d4f1f5bcfd9f8c56fdaf4074e5d603c532885a344ccd1901f500e26ae8ab97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logRelease files / 21cmmc-1.0.0-py3-none-any.whl
| Download URL | 21cmmc-1.0.0-py3-none-any.whl |
|---|---|
| Size | 197.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d87194b1fad85ecba9d51021a9b558733fe2896a4e3b74fe4ea3a081c78c27e
|
|
BLAKE2b-256 checksum How to use checksums |
e45f7f786938aabe9283b6f4fcdaf3ca3406ac8e19a1b5e1a44e30fc82c10cdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logSecurity for 21cmMC 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for 21cmmc-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.