Skip to main content
QUICK REVIEW

[Paper Review] Predicting Cosmological Observables with PyCosmo

F Tarsitano, Uwe Schmitt|arXiv (Cornell University)|May 1, 2020
Cosmology and Gravitation Theories27 references1 citations
TL;DR

This paper presents PyCosmo, a Python-based cosmology framework that accurately predicts cosmological observables by solving the Einstein-Boltzmann equations and implementing linear and non-linear power spectra via Halofit and the Mead et al. model. It achieves sub-percent-level agreement with established codes like CLASS, CCL, and HMCode across background, perturbation, and observable quantities, demonstrating high numerical accuracy and usability through an interactive web platform, PyCosmo Hub.

ABSTRACT

Current and upcoming cosmological experiments open a new era of precision cosmology, thus demanding accurate theoretical predictions for cosmological observables. Because of the complexity of the codes delivering such predictions, reaching a high level of numerical accuracy is challenging. Among the codes already fulfilling this task, $ extsf{PyCosmo}$ is a Python based framework providing solutions to the Einstein-Boltzmann equations and accurate predictions for cosmological observables. In this work, we first describe how the observables are implemented. Then, we check the accuracy of the theoretical predictions for background quantities, power spectra and Limber and beyond-Limber angular power spectra by comparison with other codes: the Core Cosmology Library ($ exttt{CCL}$), $ exttt{CLASS}$, $ exttt{HMCode}$ and $ exttt{iCosmo}$. In our analysis we quantify the agreement of $ extsf{PyCosmo}$ with the other codes, for a range of cosmological models, monitored through a series of $ extit{unit tests}$. $ extsf{PyCosmo}$, conceived as a multi purpose cosmology calculation tool in $ exttt{Python}$, is designed to be interactive and user friendly. A current version of the code (without the Boltzmann Solver) is publicly available and can be used interactively on the platform $ extsf{PyCosmo Hub}$, all accessible from this link: https://cosmology.ethz.ch/research/software-lab/PyCosmo.html . On the hub the users can perform their own computations using $ exttt{Jupyter Notebooks}$ without the need of installing any software, access to the results presented in this work and benefit from tutorial notebooks illustrating the usage of the code. The link above also redirects to the code release and documentation.

Motivation & Objective

  • To develop a user-friendly, accurate, and interactive Python-based framework for computing cosmological observables.
  • To ensure high numerical accuracy in predictions of background quantities, linear and non-linear power spectra, and angular power spectra.
  • To validate PyCosmo’s predictions against established codes such as CLASS, CCL, HMCode, and iCosmo through systematic code comparisons.
  • To provide a publicly accessible, interactive platform—PyCosmo Hub—enabling users to perform cosmological computations without local installation.

Proposed method

  • PyCosmo uses symbolic computation via SymPy to solve the Einstein-Boltzmann equations efficiently and accurately.
  • It implements fitting functions for the linear and non-linear matter power spectrum, including Halofit (Smith et al.) and the Mead et al. model (accounting for baryonic feedback).
  • Angular power spectra are computed using the Limber approximation and line-of-sight integration for CMB spectra.
  • Code comparisons are performed using unit tests across a range of cosmological models, with relative differences quantified in logarithmic base 10.
  • The framework is designed with extensibility in mind, allowing users to implement new cosmological models easily.
  • The PyCosmo Hub provides interactive Jupyter notebooks for online computation, tutorials, and results access without local software installation.

Experimental results

Research questions

  • RQ1How accurately does PyCosmo predict cosmological observables compared to established codes like CLASS, CCL, and HMCode?
  • RQ2What is the level of agreement between PyCosmo and reference codes across diverse cosmological models and observables?
  • RQ3Can PyCosmo achieve high numerical accuracy in background, linear, and non-linear perturbation calculations using symbolic computation?
  • RQ4How does the inclusion of the Mead et al. non-linear power spectrum model in PyCosmo compare to the original HMCode implementation?
  • RQ5To what extent does the PyCosmo Hub platform enable accessible, interactive cosmological computation for researchers and students?

Key findings

  • PyCosmo achieves a maximum relative difference of ∆−= −3.6 in the linear matter power spectrum (BBKS transfer function) compared to CLASS, with a dispersion of σfid = −7.9, indicating high agreement.
  • For the non-linear power spectrum using the Halofit model, PyCosmo shows a maximum relative difference of ∆−= −3.6 and ∆+= +0.4 compared to HMCode, with a fiducial dispersion of σfid = −3.3.
  • In CMB angular power spectrum predictions, PyCosmo achieves agreement within ∆−= −2.3 and ∆+= +0.4 relative to CLASS, with a fiducial dispersion of σfid = −2.3.
  • The implementation of the Mead et al. non-linear power spectrum in PyCosmo matches the original HMCode within [−7.6, −2.6] in logarithmic relative difference, confirming high accuracy.
  • PyCosmo Hub enables interactive, installation-free use of the code through Jupyter notebooks, with tutorials and precomputed results available online.
  • The framework demonstrates robustness across diverse cosmological models, with consistent agreement across background, perturbation, and observable quantities.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.