BoltzmannSolver

One of the core components of CosmoCentral are the Boltzmann solvers, codes developed by the community that solve the coupled Einstein-Boltzmann equations and used to evaluate the Matter Power Spectrum. Currently, the Boltzmann codes implemented in CosmoCentral are:

  • CLASS

We plan to include other Boltzmann solvers in the future.

Power Spectrum

CosmoCentral.PowerSpectrumType
PowerSpectrum()

This struct contains the array with the Linear and Nonlinear Power Spectrum evaluated on the $k-z$ grid and the interpolated Nonlinear Power Spectrum on Limber $k-z$ grid.

source
CosmoCentral.ComputeLimberArray!Function
ComputeLimberArray!(CosmologicalGrid::CosmologicalGrid,
BackgroundQuantities::BackgroundQuantities)

This function compute the Limber grid. In the Limber approximation, $k$ and $z$ are related by the following relation:

\[k_\ell(z)=\frac{\ell+1/2}{r(z)}.\]

source
CosmoCentral.InterpolatePowerSpectrumLimberGrid!Function
InterpolatePowerSpectrumLimberGrid!(CosmologicalGrid::CosmologicalGrid,
BackgroundQuantities::BackgroundQuantities, PowerSpectrum::PowerSpectrum,
::InterpolationMethod)

This function interpolates the Power Spectrum on the $k-z$ grid and evaluates it on the Limber grid.

source
CosmoCentral.InterpolationMethodType
InterpolationMethod

This type is used to specify the method to interpolate the Power Spectrum; actually are included:

  • Dierckx.jl, the Julia wrapper for the Fortran library Dierckx

  • GriddedLinear, from Interpolations.jl

  • BSpliceCubic (recommended, for its speed and accuracy), from Interpolations.jl

source

classy

classy is the Python wrapper for CLASS.

For instance, here we show the linear and nonlinear $P_{\delta\delta}(k,z)$, evaluated by CLASS, for a the reference cosmology.

p = plot(CosmologicalGrid.KArray, PowerSpectrum.PowerSpectrumLinArray[:,1],
ylabel = L"P(k)\,\left[\mathrm{Mpc}^{3}\right]", xlabel = L"k\,\left[\mathrm{Mpc}^{-1}\right]",
xaxis=:log, yaxis=:log, label = L"\mathrm{Linear}", xlims = (1e-5,10), ylims = (1,1e5))
plot!(p, CosmologicalGrid.KArray, PowerSpectrum.PowerSpectrumNonlinArray[:,1],
xaxis=:log, yaxis=:log, label = L"\mathrm{Nonlinear}")

When performing forecasts, $P_{\delta \delta}(k,z)$ can be valuated once and stored (we provide a precomputed set of spectra here), so their computational impact is reduced. However, when evaluating $C_\ell$'s, there is a not negligible impact of $P_{ \delta\delta}(k,z)$ interpolation and evaluation on the Limber $k-$grid.

@benchmark CosmoCentral.InterpolatePowerSpectrumLimberGrid!(CosmologicalGrid,
BackgroundQuantities, PowerSpectrum, CosmoCentral.BSplineCubic())