Skip to content

Install and data

Install the package, then download the datasets you need once.

pip install cosmonuts            # or: uv add cosmonuts
cosmonuts --version

Extras

The core install runs the bundled W0WaCDM theory with BAO and supernova likelihoods. Everything else is an optional extra, imported only when you use it:

Extra Adds Needed for
classe class-e emulators ClassETheory, binned \(P(k)\), CMB spectra
eft4py eft4py EFT4PyTheory, DESIDR1ShapeFit
desi h5py DESI data files
clipy clipy-like Planck 2018 .clik likelihoods
candl candl-like ACT and SPT likelihoods
mpi mpi4py parallel="mpi"
gpu jax[cuda13] NVIDIA GPUs (Linux)
pip install 'cosmonuts[classe,clipy]'

Theory backends stay optional

class-e and eft4py are never required. Their modules are imported lazily, so a missing backend only fails when you ask for it, with a message naming the extra.

Data

cosmonuts install downloads the data of the bundled likelihoods:

cosmonuts install desi_dr2_bao des_dovekie desi_dr1
cosmonuts install pantheon_plus union3 union3.1
cosmonuts install --all --path ~/cosmo_data
cosmonuts install --help          # lists each dataset and whether it is installed

The packages path is, in order, --path, the COSMONUTS_PACKAGES_PATH environment variable, then the platform's user data directory. From Python: install, is_installed and packages_path. A likelihood whose data are missing raises DataNotFoundError.

Likelihoods

Dataset (cosmonuts install) Likelihood classes
desi_dr2_bao DESIDR2BAO
desi_dr1 DESIDR1BAO, DESIDR1ShapeFit
des_dovekie DESDovekie
pantheon_plus PantheonPlus, PantheonPlusSH0ES
union3, union3.1 Union3, Union31
planck_2018_clik PlanckLowlTT, PlanckLowlEE, PlanckPlikLiteTTTEEE (extra clipy)
none PlanckPR4EarlyLCDM: three numbers shipped with the package
user data ClipyLikelihood (any .clik file), CandlLikelihood (extra candl)

cosmonuts info likelihoods prints the same list from your installation.