Skip to content

Home

class-e Logo

A fast & user-friendly emulation framework for the Boltzmann solver CLASS and its extensions.

image image image Docs Source Code image image

Exploring the Universe on a laptop with class-e

  • class-e is designed to make cosmological computations accessible and efficient, allowing researchers and enthusiasts to explore complex models without the need for high-performance computing resources.
  • With class-e, you can perform rapid calculations of cosmological observables, enabling quick iterations and explorations of different scenarios.
  • Its user-friendly interface simplifies the process of generating data and training emulators, making it easier for users to focus on their favorite beyond-\(\Lambda\)CDM model.
  • The emulator is optimized for speed and ease of use, making it an ideal tool for both educational purposes and advanced research in cosmology.

Installation

Installing class-e is as simple as running the following command in your terminal:

pip install class-e

Getting Started

After installing class-e, you can start using it in your Python scripts or interactive sessions. Here's a simple example to get you started:

from class_e import ClassE

cosmo=ClassE()
this will create an instance of the ClassE class with an emulator for \(\Lambda\)CDM. You can then use this instance to compute various cosmological observables quickly and efficiently. From here, you can explore the full capabilities of class-e by referring to the documentation and examples provided.

Citation

If you use class-e in your research, please consider citing the following paper:

@article{Calderon2026,
  title={class-e: Emulating the Boltzmann solver CLASS and its extensions},
  author={Calderón, R. and others},
  journal={Journal of Cosmology and Astroparticle Physics},
  year={2026},
  publisher={IOP Publishing}
}

as well as the original CLASS paper:

@article{Blas2011,
  title={Cosmic linear anisotropy solving system (CLASS) II: Approximation schemes},
  author={Blas, D. and Lesgourgues, J. and Tram, T.},
  journal={Journal of Cosmology and Astroparticle Physics},
  volume={2011},
  number={07},
  pages={034},
  year={2011},
  publisher={IOP Publishing}
}