Source Density
In this page are presented the structures and functions used to deal with source densities and are listed here.
CosmoCentral.AnalitycalDensity
CosmoCentral.ConvolvedDensity
CosmoCentral.InstrumentResponse
CosmoCentral.ComputeConvolvedDensity
CosmoCentral.ComputeConvolvedDensityGrid!
CosmoCentral.ComputeDensity
CosmoCentral.ComputeInstrumentResponse
CosmoCentral.NormalizeAnalitycalDensity!
CosmoCentral.NormalizeConvolvedDensity!
Source Density
In the evaluation of Angular Coefficients, central quantities are the source densities. In this section are presented the custom types and function used to deal with the source densities.
CosmoCentral.AnalitycalDensity
— TypeAnalitycalDensity(z0::Float64 = 0.9/sqrt(2.), zmin::Float64 = 0.001,
zmax::Float64 = 2.5, surfacedensity::Float64 = 30.,
normalization::Float64 = 1.)
This struct contains the parameters of the source galaxy density as given by the official Euclid forecast, whose expression is given by:
\[n(z)\propto\left(\frac{z}{z_0}\right)^2 \exp{\left(-\left(\frac{z}{z_0}\right)^{-3/2}\right)}\]
The parameters contained in this struct are
$z_{min}$ and $z_{max}$, the minimum and the maximum redshift considered
$z_0$, the parameter present in the galaxy distribution
surfacedensity
, the value of the galaxy source density integrated between $z_{min}$ and $z_{max}$normalization
, the value of parameter which multiplies the source dennsity in order to match the correct surface density
CosmoCentral.ComputeDensity
— FunctionComputeDensityFunction(z::Float64, AnalitycalDensity::AnalitycalDensity)
This function returns the source density for a given redshift $z$.
CosmoCentral.NormalizeAnalitycalDensity!
— FunctionNormalizeAnalitycalDensity!(AnalitycalDensity::AnalitycalDensity)
This function normalize AnalitycalDensity in order to have the correct value of the surface density once integrated.
Convolved Source Density
In real surveys we do not deal with the exact distributions due to errors in the measurement of the source redshifts. The redshift errors are accounted for convolving the source density with a redshift measurement error.
Intrument Response
CosmoCentral.InstrumentResponse
— TypeInstrumentResponse(cb::Float64 = 1.0, zb::Float64 = 0.0,
σb::Float64 = 0.05, co::Float64 = 1.0, zo::Float64 = 0.1,
σo::Float64 = 0.05, fout::Float64 = 0.1)
When we measure the redshift of a galaxy with redshit $z$, we will measure a redshift $z_p$ with a probability given by the following expression:
\[p(z_p|z) = \frac{1-f_{out}}{\sqrt{2 \pi} \sigma_{b}(1+z)} \exp \left( -\frac{1}{2}\left(\frac{z-c_{b} z_{b}-z_{b}}{\sigma_{b}(1+z)}\right)^{2} \right) + \frac{f_{out}}{\sqrt{2 \pi} \sigma_{\mathrm{o}}(1+z)} \exp \left(-\frac{1}{2}\left(\frac{z-c_{o} z_{p}-z_{o}}{\sigma_{o}(1+z)} \right)^{2}\right)\]
This struct contains all these parameters.
CosmoCentral.ComputeInstrumentResponse
— FunctionComputeInstrumentResponse(z::Float64, zp::Float64,
InstrumentResponse::InstrumentResponse)
This function computes the probability that we actually measure a redshift $z_p$ if the real redshift is $z$.
Convolved Source Density
CosmoCentral.ConvolvedDensity
— TypeConvolvedDensity(AnalitycalDensity::AnalitycalDensity = AnalitycalDensity(),
InstrumentResponse::InstrumentResponse = InstrumentResponse()
ZBinArray::Vector{Float64} = Array([0.001, 0.418, 0.560, 0.678, 0.789, 0.900, 1.019, 1.155, 1.324, 1.576, 2.50])
DensityNormalizationArray::Vector{Float64} = ones(length(ZBinArray)-1)
DensityGridArray::AbstractArray{Float64, 2} = ones(length(ZBinArray)-1, 300))
In order to take into account the error in the redshift measurement, the source density is convolved with the InstrumentResponse
, according to the following equation
\[n_{i}(z)=\frac{\int_{z_{i}^{-}}^{z_{i}^{+}} \mathrm{d} z_{\mathrm{p}} n(z) p \left(z_{\mathrm{p}} \mid z\right)}{\int_{z_{\min }}^{z_{\max }} \mathrm{d} z \int_{z_{i}^{-}}^{z_{i}^{+}} \mathrm{d} z_{\mathrm{p}} n(z) p \left(z_{\mathrm{p}} \mid z\right)}\]
CosmoCentral.ComputeConvolvedDensity
— FunctionComputeConvolvedDensity(z::Float64, i::Int64, ConvolvedDensity::AbstractConvolvedDensity,
AnalitycalDensity::AnalitycalDensity, InstrumentResponse::InstrumentResponse)
This function computes the Convolved density function for a single bin at a given redshift $z$.
CosmoCentral.NormalizeConvolvedDensity!
— FunctionNormalizeConvolvedDensity!(ConvolvedDensity::AbstractConvolvedDensity,
AnalitycalDensity::AnalitycalDensity,InstrumentResponse::InstrumentResponse,
CosmologicalGrid::CosmologicalGrid)
This function normalizes ConvolvedDensity such that the integrals of the convolved densities are normalized to 1.
CosmoCentral.ComputeConvolvedDensityGrid!
— FunctionComputeConvolvedDensityGrid!(CosmologicalGrid::CosmologicalGrid,
ConvolvedDensity::AbstractConvolvedDensity, AnalitycalDensity::AnalitycalDensity,
InstrumentResponse::InstrumentResponse)
This function computes the convolved density function for all tomographic bins on the $z$-grid provided by CosmologicalGrid.
Here we show how to calculate $n_g^i(z)$, then we will plot it
#instantiate the analytical density and normalize it
AnalitycalDensity = CosmoCentral.AnalitycalDensity()
CosmoCentral.NormalizeAnalitycalDensity!(AnalitycalDensity)
#instantiate the instrument response and compute the convolved density
InstrumentResponse = CosmoCentral.InstrumentResponse()
ConvolvedDensity = CosmoCentral.ConvolvedDensity(DensityGridArray = ones(10,
length(CosmologicalGrid.ZArray)))
CosmoCentral.NormalizeConvolvedDensity!(ConvolvedDensity, AnalitycalDensity,
InstrumentResponse, CosmologicalGrid)
CosmoCentral.ComputeConvolvedDensityGrid!(CosmologicalGrid, ConvolvedDensity,
AnalitycalDensity, InstrumentResponse)
p = Plots.plot(xlabel=L"z", ylabel=L"n_i^g(z)",
title="Normalized galaxy density")
for i in 1:10
Plots.plot!(p, CosmologicalGrid.ZArray, ConvolvedDensity.DensityGridArray[i,:],
labels=(L"i=%$i"), linewidth=3)
end
p