PyCosmo
As wide-field surveys yield ever more precise measurements, cosmology has entered a phase of high precision requiring highly accurate and fast theoretical predictions. At the heart of most cosmological model predictions is a numerical solution of the Einstein-Boltzmann equations governing the evolution of linear perturbations in the Universe. PyCosmo is a Python-based framework to solve this set of equations and relies on the external sympy2c package for generation of optimized C/C++ code from SymPy symbolic expressions. The symbolic representation of the Einstein-Boltzmann equation system in PyCosmo provides a convenient interface for implementing extended cosmological models. The PyCosmo framework can also be used as a general framework to compute cosmological quantities as well as observables for both interactive and high-performance batch jobs applications.
PyCosmo Hub
PyCosmo is conceived as a multi-purpose cosmology calculation tool in Python, and designed to be interactive and user-friendly. In order to make its usage immediate to the users, we make PyCosmo publicly available on a hub platform, called PyCosmo Hub: https://pycosmohub.phys.ethz.ch/hub/login. The users accessing the Hub can follow tutorials showing how to use PyCosmo. Also, they have space to write their own notebooks, make their own calculations and save the results, without the need of installing any software.
Code release and documentation
If you are interested in installing the software, here you can find the latest public release: .
Documentation about the software can be found at the link: https://cosmo-docs.phys.ethz.ch/PyCosmo/. Tutorial notebooks are available on the PyCosmo Hub.
Publications
The first version of the code is described in Refregier et al., 2017 (external pagehttps://arxiv.org/abs/1708.05177call_made). This paper focuses on the implementation of the Boltzmann solver and shows its performance in computing cosmological transfer functions (see the figure below). Tarsitano et al., 2021 (external pagehttps://arxiv.org/abs/2005.00543call_made) focuses on the computation of cosmological quantities at the level of background, linear and non-linear perturbations and observables. The accuracy of PyCosmo computations has been assessed through code comparison with other similar codes (external pageCLASScall_made, external pageiCosmocall_made, external pageCCLcall_made, external pageHMCodecall_made). Moser et al., 2021 (external pagehttps://arxiv.org/abs/2112.08395call_made) describes the re-implementation and extension of the Boltzmann solver, which now uses the external pagesympy2ccall_made (Schmitt et al., in prep) package to generate optimized C/C++ code from symbolic expressions. The extensions include cosmological models (dark energy with a constant equation of state and massive neutrinos) and an approximation scheme (the Radiation Streaming Approximation). We compared PyCosmo with CLASS and found a good agreement both in terms of numerical accuracy and computing time.
If you use PyCosmo for your publications, please cite the papers above.
Public code releases
- Version 2.0.0 (09/12/2021) release of PyCosmo with the Boltzmann code, accompanying Moser et al., 2021 (external pagehttps://arxiv.org/abs/2112.08395call_made)
- Version 0.4.4 (22/04/2020) release of PyCosmo focusing on observables accompanying Tarsitano et al., 2021 (external pagehttps://arxiv.org/abs/2005.00543call_made)