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.PowerSpectrum
— TypePowerSpectrum()
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.
CosmoCentral.ComputeLimberArray!
— FunctionComputeLimberArray!(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)}.\]
CosmoCentral.InterpolatePowerSpectrumLimberGrid!
— FunctionInterpolatePowerSpectrumLimberGrid!(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.
CosmoCentral.InterpolationMethod
— TypeInterpolationMethod
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
classy
classy is the Python wrapper for CLASS.
CosmoCentral.classyParams
— TypeclassyParams(classyParamsDict::Dict)
This struct contains the dictionary with the classy parameters. For a detalied explanation of the parameters, please refer to the CLASS website
CosmoCentral.Initializeclassy
— FunctionInitializeclassy(cosmo::w0waCDMCosmology)
This function, given a w0waCDMCosmology
, returns the classyParams
correctly initialized.
CosmoCentral.EvaluatePowerSpectrum!
— FunctionEvaluatePowerSpectrum!(classyParams:: classyParams, cosmogrid::CosmologicalGrid,
pmm::PowerSpectrum)
This function runs classy to evaluate the Matter Power Spectrum over the $k-z$ grid specified in CosmologicalGrid
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())