cosmoprimo is a Python package for primordial cosmology, i.e. background and perturbation quantities typically predicted by Boltzmann codes CAMB or CLASS. cosmoprimo provides a coherent interface (and parameter names!) to CLASS and CAMB, ensuring same units and same definitions (e.g. fsigma8 as the amplitude of velocity perturbations in spheres of 8 Mpc/h). It also includes approximations such as EH1998, BBKS, together with routines to manipulate these results:
- automatic sigma8 rescaling
- the FFTlog algorithm (using numpy.fft or pyfftw engines)
- interpolate power spectra, correlation functions (as a function of k and k, z)
- compute sigma(r,z)
- filters to remove BAO features from the power spectrum/correlation function.
Documentation is hosted on Read the Docs, cosmoprimo docs.
Only strict requirements are:
- numpy
- scipy
If one wants to use CLASS:
- pyclass
If one wants to use CAMB:
- camb
For faster FFTs in the FFTlog algorithm:
- pyfftw
See cosmoprimo building.
Much inspired by pyccl and nbodykit's cosmology class. Help from mcfit, hankl, barry. Stephen Chen and Samuel Brieden for wallish2018 and brieden2022 BAO filters. Rafaela Gsponer for typos.
cosmoprimo is free software distributed under a BSD3 license. For details see the LICENSE.