English

Symbolic Implementation of Extensions of the $\texttt{PyCosmo}$ Boltzmann Solver

Cosmology and Nongalactic Astrophysics 2022-06-20 v2

Abstract

PyCosmo\texttt{PyCosmo} is a Python-based framework for the fast computation of cosmological model predictions. One of its core features is the symbolic representation of the Einstein-Boltzmann system of equations. Efficient C/C++\texttt{C/C++} code is generated from the SymPy\texttt{SymPy} symbolic expressions making use of the sympy2c\texttt{sympy2c} package. This enables easy extensions of the equation system for the implementation of new cosmological models. We illustrate this with three extensions of the PyCosmo\texttt{PyCosmo} Boltzmann solver to include a dark energy component with a constant equation of state, massive neutrinos and a radiation streaming approximation. We describe the PyCosmo\texttt{PyCosmo} framework, highlighting new features, and the symbolic implementation of the new models. We compare the PyCosmo\texttt{PyCosmo} predictions for the Λ\LambdaCDM model extensions with CLASS\texttt{CLASS}, both in terms of accuracy and computational speed. We find a good agreement, to better than 0.1% when using high-precision settings and a comparable computational speed. Links to the Python Package Index (PyPI) page of the code release and to the PyCosmo Hub, an online platform where the package is installed, are available at: https://cosmology.ethz.ch/research/software-lab/PyCosmo.html.

Keywords

Cite

@article{arxiv.2112.08395,
  title  = {Symbolic Implementation of Extensions of the $\texttt{PyCosmo}$ Boltzmann Solver},
  author = {Beatrice Moser and Christiane S. Lorenz and Uwe Schmitt and Alexandre Refregier and Janis Fluri and Raphael Sgier and Federica Tarsitano and Lavinia Heisenberg},
  journal= {arXiv preprint arXiv:2112.08395},
  year   = {2022}
}

Comments

35 pages including 5 figures and 3 tables. Link to $\texttt{PyCosmo}$ package: https://cosmology.ethz.ch/research/software-lab/PyCosmo.html