paper

Kosmulator: A Python framework for cosmological inference with MCMC

arXiv:2602.08424

Abstract

We present Kosmulator, a modular and vectorised Python framework designed to accelerate the statistical testing of cosmological models. As the theoretical landscape expands beyond standard CDM, implementing new expansion histories into traditional Einstein--Boltzmann solvers becomes a significant computational bottleneck. Kosmulator addresses this by leveraging array-native execution and efficient ensemble slice sampling (via Zeus) to perform rapid Bayesian inference. We validate the framework against the industry-standard Cobaya code using a combination of Type Ia Supernovae, Cosmic Chronometers, and Baryon Acoustic Oscillation (BAO) data. Our results demonstrate that Kosmulator reproduces Cobaya's posterior constraints to within statistical agreement on and and precision on , while achieving a reduction in wall-clock time on a single CPU core compared to a standard MPI-parallelised baseline. Furthermore, we showcase the framework's utility by constraining the implicit power-law "CDM" model and demonstrating its automated model selection capabilities (AIC/BIC). Kosmulator is introduced as a "scientific sieve" for rapid hypothesis testing, allowing researchers to efficiently filter theoretical candidates before deploying high-precision resources.

12 pages, 1 figure, 2 tables, 3 Python listings, Submitted for publication in the South African Gravity Society (SAGS) 2025 conference proceedings

Kosmulator: A Python framework for cosmological inference with MCMC · wovepaper