CLASSpp#

CLASSpp is the C++ evolution of CLASS, the Cosmic Linear Anisotropy Solving System — an Einstein–Boltzmann solver computing CMB and large-scale-structure observables for standard and exotic cosmologies.

The notebooks on this site are executed nightly against CLASSpp master, so every plot reflects the current code.

🚀 Tutorials

Start here: compute your first spectra, then work through distances, thermodynamics, perturbations and power spectra.

Tutorials
🌌 Cosmology models

Showcases of extended models: axions, dark matter decaying to massive daughters, self-interacting neutrinos, and more.

Cosmology models
🛠️ C++ API reference

Doxygen reference for the C++ code base: modules, the species-plugin hierarchy, and source maps.

api/index.html
💻 Source code

CLASSpp on GitHub: issues, releases and contributions welcome.

https://github.com/AarhusCosmology/CLASSpp_public

Quickstart#

Install the Python wrapper from PyPI:

pip install classy-community

Then compute your first CMB spectrum:

from classy import Class

cosmo = Class()
cosmo.set({"output": "tCl", "l_max_scalars": 2500})
cosmo.compute()
cls = cosmo.raw_cl(2500)

Head to the tutorials to go further, or build the C++ command-line code with make class (see the README).