Weight Function

Galaxy Clustering

The expression of the Galaxy Clustering Weight Function is given by:

\[W_{i}^{\mathrm{G}}(z)=b_{i}(z) n_{i}(z) \frac{H(z)}{c}\]

CosmoCentral.ComputeWeightFunctionMethod
ComputeWeightFunction(z::Float64, i::Int64, ConvolvedDensity::AbstractConvolvedDensity,
AnalitycalDensity::AnalitycalDensity, InstrumentResponse::InstrumentResponse,
w0waCDMCosmology::w0waCDMCosmology, GCWeightFunction::GCWeightFunction)

This function returns the Galaxy Clustering Weight function for a given redshift $z$ and tomographic bin $i$.

source
CosmoCentral.ComputeWeightFunctionGrid!Method
ComputeWeightFunctionGrid!(GCWeightFunction::GCWeightFunction,
ConvolvedDensity::AbstractConvolvedDensity, CosmologicalGrid::CosmologicalGrid,
BackgroundQuantities::BackgroundQuantities, Cosmology::AbstractCosmology)

This function evaluates the Galaxy Clustering Weight Function over the $z$ grid and for all tomographic bins $i$.

source

For instance, here we plot the Galaxy Clustering weight function with a piecewise bias

PiecewiseBias = CosmoCentral.PiecewiseBias()
GCWeightFunction = CosmoCentral.GCWeightFunction(WeightFunctionArray =
zeros(length(ConvolvedDensity.DensityNormalizationArray), length(CosmologicalGrid.ZArray)))

CosmoCentral.ComputeBiasGrid!(CosmologicalGrid, GCWeightFunction, ConvolvedDensity)
CosmoCentral.ComputeWeightFunctionGrid!(GCWeightFunction, ConvolvedDensity,
CosmologicalGrid, BackgroundQuantities, w0waCDMCosmology)
p = Plots.plot(xlabel=L"z", ylabel=L"W_i^g(z)\,\left[\mathrm{Mpc}^{-1}\right]")
for i in 1:10
Plots.plot!(p, CosmologicalGrid.ZArray, GCWeightFunction.WeightFunctionArray[i,:],
    labels=(L"i=%$i"),  linewidth=3)
end
p

Computing $b(z)$ and $W_i^g(z)$ is quite fast

@benchmark CosmoCentral.ComputeBiasGrid!(CosmologicalGrid, GCWeightFunction, ConvolvedDensity)
@benchmark CosmoCentral.ComputeWeightFunctionGrid!(GCWeightFunction, ConvolvedDensity,
CosmologicalGrid, BackgroundQuantities, w0waCDMCosmology)

Weak Lensing

The expression of the Weak Lensing Weight Function is given by:

\[W_{i}^{\gamma}(z)=\frac{3}{2}\left(\frac{H_{0}}{c}\right)^{2} \Omega_{\mathrm{m}, 0}(1+z) r(z) \widetilde{W}_{i}(z)\]

where $\widetilde{W}_{i}(z)$ is the Lensing Efficiency, whose expression is given by

\[\widetilde{W}_{i}(z)=\int_{z}^{z_{\max }} \mathrm{d} z^{\prime} n_{i}\left(z^{\prime}\right)\left[1-\frac{\tilde{r}(z)}{\tilde{r}\left(z^{\prime}\right)}\right]\]

CosmoCentral.ComputeWeightFunctionMethod
ComputeWeightFunction(z::Float64, i::Int64,ConvolvedDensity::AbstractConvolvedDensity,
AnalitycalDensity::AnalitycalDensity, InstrumentResponse::InstrumentResponse,
Cosmology::AbstractCosmology, CosmologicalGrid::CosmologicalGrid,
LensingFunction::WLWeightFunction)

This function returns the Weak Lensing Weight Function, for a given redshift $z$ and tomographic bin $i$.

source
CosmoCentral.ComputeWeightFunctionGrid!Method
ComputeWeightFunctionGrid!(LensingFunction::WLWeightFunction,
ConvolvedDensity::AbstractConvolvedDensity, CosmologicalGrid::CosmologicalGrid,
BackgroundQuantities::BackgroundQuantities, Cosmology::AbstractCosmology)

This function evaluates the Weak Lensing Weight Function over the $z$ grid and for all tomographic bins $i$.

source
CosmoCentral.ComputeLensingEfficiencyMethod
ComputeLensingEfficiency(z::Float64, i::Int64,
ConvolvedDensity::AbstractConvolvedDensity, AnalitycalDensity::AnalitycalDensity,
InstrumentResponse::InstrumentResponse, w0waCDMCosmology::w0waCDMCosmology,
CosmologicalGrid::CosmologicalGrid, ::WLWeightFunction)

This function returns the Lensing efficiency, for a given redshift $z$ and tomographic bin $i$.

source
CosmoCentral.ComputeLensingEfficiencyGrid!Method
ComputeLensingEfficiencyGrid!(LensingFunction::WLWeightFunction,
AnalitycalDensity::AnalitycalDensity, InstrumentResponse::InstrumentResponse,
ConvolvedDensity::AbstractConvolvedDensity, CosmologicalGrid::CosmologicalGrid,
BackgroundQuantities::BackgroundQuantities, Cosmology::AbstractCosmology,
::StandardLensingEfficiency)

This function evaluates the Lensing Efficiency over the $z$ grid and for all tomographic bins $i$.

source
CosmoCentral.ComputeLensingEfficiencyGrid!Method
ComputeLensingEfficiencyGrid!(
LensingFunction::WLWeightFunction, ConvolvedDensity::AbstractConvolvedDensity,
CosmologicalGrid::CosmologicalGrid, BackgroundQuantities::BackgroundQuantities,
w0waCDMCosmology::w0waCDMCosmology, ::CustomLensingEfficiency)

This function evaluates the Lensing Efficiency over the $z$ grid and for all tomographic bins $i$.

source

Here we plot the Weak Lensing weight function. In particular, the solid lines are pure shear, while the dashed lines includes the Intrinsic Alignment contribution.

WLWeightFunction = CosmoCentral.WLWeightFunction(WeightFunctionArray = zeros(length(ConvolvedDensity.DensityNormalizationArray), length(CosmologicalGrid.ZArray)), LensingEfficiencyArray = zeros(length(ConvolvedDensity.DensityNormalizationArray), length(CosmologicalGrid.ZArray)))
CosmoCentral.ComputeLensingEfficiencyGrid!(
    WLWeightFunction, ConvolvedDensity,
    CosmologicalGrid,
    BackgroundQuantities,
    w0waCDMCosmology, CosmoCentral.CustomLensingEfficiency())
CosmoCentral.ComputeWeightFunctionGrid!(WLWeightFunction, ConvolvedDensity, CosmologicalGrid, BackgroundQuantities, w0waCDMCosmology)
p = Plots.plot(xlabel=L"z", ylabel=L"W_i^\gamma(z)\,\left[\mathrm{Mpc}^{-1}\right]")
for i in 1:10
Plots.plot!(p, CosmologicalGrid.ZArray, WLWeightFunction.WeightFunctionArray[i,:],
    labels=(L"i=%$i"),  linewidth=3)
end

CosmoCentral.ComputeIntrinsicAlignmentGrid!(CosmologicalGrid, WLWeightFunction, ConvolvedDensity, BackgroundQuantities, w0waCDMCosmology)
CosmoCentral.ComputeWeightFunctionGrid!(WLWeightFunction, ConvolvedDensity, CosmologicalGrid, BackgroundQuantities, w0waCDMCosmology)
for i in 1:10
Plots.plot!(p, CosmologicalGrid.ZArray, WLWeightFunction.WeightFunctionArray[i,:],
linewidth=3, linestyle = :dash)
end
p

Computations related to Weak Lensing are a bit slower, due to the nested integrals inside $W_i^\gamma(z)$

@benchmark CosmoCentral.ComputeLensingEfficiencyGrid!(WLWeightFunction, ConvolvedDensity,
CosmologicalGrid, BackgroundQuantities, w0waCDMCosmology,
CosmoCentral.CustomLensingEfficiency())