Angular Coefficients

Central quantities are the Angular Coefficients $C_\ell$. Actually we implement only the Limber approximation to evaluate the $C_\ell$, according to:

\[C_{i j}^{AB}(\ell)=\frac{c}{H_0} \int_{z_{\min }}^{z_{\max }} \mathrm{d} z \frac{W_{i}^{A}(z) W_{j}^{B}(z)}{E(z) r^{2}(z)} P_{\delta \delta}\left(\frac{\ell+1 / 2}{r(z)}, z\right)\]

CosmoCentral.CℓType
Cℓ(CℓArray::AbstractArray{Float64, 3})

This struct contains the array with the Angular Coefficients.

source
CosmoCentral.∂CℓType
∂Cℓ(∂CℓArray::AbstractArray{Float64, 3})

This struct contains the array with the derivatives of the Angular Coefficients.

source
CosmoCentral.ComputeCℓ!Method
ComputeCℓ!(Cℓ::AbstractCℓ, WeightFunctionA::AbstractWeightFunction,
WeightFunctionB::AbstractWeightFunction, BackgroundQuantities::BackgroundQuantities,
::AbstractCosmology, CosmologicalGrid::AbstractCosmologicalGrid,
PowerSpectrum::AbstractPowerSpectrum, ::NumericalIntegrationSimpson)

This function evaluates the Angular Coefficients for all tomographic bins and multipole values. In order to evaluate the numerical integrals, it is employed the Simpson numerical method from NumericalIntegration.jl . This is not the fastest method available, but can be used as a benchmark to check consistency.

source
CosmoCentral.ComputeCℓ!Method
ComputeCℓ!(Cℓ::AbstractCℓ, WeightFunctionA::AbstractWeightFunction,
WeightFunctionB::AbstractWeightFunction,
BackgroundQuantities::AbstractBackgroundQuantities,
::AbstractCosmology, CosmologicalGrid::AbstractCosmologicalGrid,
PowerSpectrum::AbstractPowerSpectrum, ::CustomSimpson)

This function evaluates the Angular Coefficients for all tomographic bins and multipole values. In order to evaluate the numerical integrals, it has been implemented the Simpson rule. The computation is accelerated by LoopVectorization.jl .

source

Here we show how to compute and plot the $C_\ell$'s for Weak Lensing.

CℓLL = CosmoCentral.Cℓ(CℓArray = zeros(length(CosmologicalGrid.ℓBinCenters),
length(WLWeightFunction.WeightFunctionArray[:, 1]),
length(WLWeightFunction.WeightFunctionArray[:, 1])))
CosmoCentral.ComputeCℓ!(CℓLL, WLWeightFunction, WLWeightFunction, BackgroundQuantities,
w0waCDMCosmology, CosmologicalGrid, PowerSpectrum, CosmoCentral.CustomSimpson())

x = CosmologicalGrid.ℓBinCenters
p = Plots.plot(xlabel=L"\ell", ylabel=L"\ell(\ell+1)C_{ii}^{LL}",
    title="Weak Lensing", legend=:bottomright)
for i in 1:10
    y =
    CℓLL.CℓArray[:,i,i] .* CosmologicalGrid.ℓBinCenters .*(CosmologicalGrid.ℓBinCenters .+1)
Plots.plot!(p, x, y, labels=(L"i=%$i"),  linewidth=3, xaxis=:log, yaxis=:log)
end
p

Following the same procedure it is possible to evaluate the Galaxy Clustering $C_\ell$'s...

x = CosmologicalGrid.ℓBinCenters
p = Plots.plot(xlabel=L"\ell", ylabel=L"\ell(\ell+1)C_{ii}^{GG}",
    title="Galaxy Clustering", legend=:bottomright)
for i in 1:10
    y =
    CℓGG.CℓArray[:,i,i] .* CosmologicalGrid.ℓBinCenters .* (CosmologicalGrid.ℓBinCenters .+1)
Plots.plot!(p, x, y, labels=(L"i=%$i"),  linewidth=3, xaxis=:log, yaxis=:log)
end
p

...and the $C_\ell$'s of the Cross-Correlation. Due to the contributions of the Intrinsic Alignment, some of the $C_\ell$'s are negative. Since we use the loglog scale, we plot the absolute value of the angular coefficients; the negative $C_\ell$'s are indicated with dashed lines

x = CosmologicalGrid.ℓBinCenters
p = Plots.plot(xlabel=L"\ell", ylabel=L"\ell(\ell+1)|C_{ii}^{GL}|",
    title= "Galaxy-Galaxy Lensing", legend=:bottomright)
for i in 1:10
    y = CℓGL.CℓArray[:,i,i] .* CosmologicalGrid.ℓBinCenters .*
    (CosmologicalGrid.ℓBinCenters .+1)
    if any(x->x<=0, y)
        Plots.plot!(p, x, -y, labels=(L"i=%$i"),  linewidth=3, xaxis=:log, yaxis=:log,
        linestyle = :dash)
    else
        Plots.plot!(p, x, y, labels=(L"i=%$i"),  linewidth=3, xaxis=:log, yaxis=:log)
    end
end
p

Finally, the computation of the $C_\ell$'s is quite fast. In particular, here we benchmark their evaluation with 100 different $\ell$'s value.

@benchmark CosmoCentral.ComputeCℓ!(CℓGL, GCWeightFunction, WLWeightFunction, BackgroundQuantities, w0waCDMCosmology, CosmologicalGrid, PowerSpectrum, CosmoCentral.CustomSimpson())