ComputeCls#
- class cosmicjellyfish.LSSsurvey.photo_obs.ComputeCls(cosmopars, photopars, IApars, biaspars, print_info_specs=False, fiducial_cosmo=None, *, configuration=None)[source]#
Bases:
object- compute_all()[source]#
Main function to compute the angular power spectrum. Will first compute the limber approximated angular power spectrum and the window functions for both probes. From that it will obtain the angular power spectrum.
Note
This function does not return the calculated quantities. Rather they are found in new attributes of the object.
The result of the Limber approximated power spectra are found in the new attributes Pell and sqrtPell
The window functions are found in the new attributes GC if galaxy clustering is asked for, and WL if cosmic sheer is asked for
The angular power spectrum is found in the new attribute result
- P_limber()[source]#
Calculates the Limber-approximated power spectrum. This is done for a range of redshift values and multipoles. Will add MG effects to WL and(!) GCph if asked for.
Note
This does not return the power spectra. The results are stored in the attribute Pell
- sqrtP_limber()[source]#
Calculates the square root of the Limber-approximated power spectrum for weak lensing (WL) and galaxy clustering photometric (GCph) observables. This is done for a range of redshift values and multipoles. Depending on the tracer asked for in ‘GCph_Tracer’ will use ‘matter’ or ‘clustering’ observable GCph. Will add MG effects to WL if asked for.
Note
This does not return the power spectra. The results are stored in the attribute sqrtPell
- galaxy_kernel(z, i)[source]#
Calculates the GCph kernel function
- Parameters:
z (
numpy.ndarray) – array containing the redshifts for which the kernel should be computed fori (
int) – index of the redshift bin
- Returns:
Value of the galaxy clustering kernel at redshift z for bin i
- Return type:
Note
Implements the following equation:
\[W_i^{GCph} = b(z) \frac{n_i(z)}{\bar{n}(z)} H(z)\]
- lensing_kernel(z, i)[source]#
Computes the photometric cosmic shear kernel function
- Parameters:
z (
numpy.ndarray) – array containing the redshifts for which the kernel should be computed fori (
int) – index of the redshift bin
- Returns:
Value of the cosmic shearing kernel at redshift z for bin i
- Return type:
Note
Implements the following equation:
\[W_i^{WL} = W_i^{IA}+\frac{3}{2}\left(\frac{H_0}{c}\right)^2\Omega_{m,0}(1+z)r(z) \int_z^{z_{\rm max}}{dz' \frac{n_i(z')}{\bar{n}(z)}\left[1-\frac{r(z)}{r(z')}\right]}\]
- integral_efficiency(i)[source]#
computes the integral that enters the lensing kernel for a given redshift bin
- Parameters:
i (
int) – index of the redshift bin for which the lensing efficiency should be calculated- Returns:
callable function that receives a numpy.ndarray of requested redshifts and returns the lensing efficiency for the i-th bin as a numpy.ndarray
- Return type:
callable
- lensing_efficiency()[source]#
computes the integral that enters the lensing kernel for all redshift bins
- Returns:
list of callable functions that give the lensing efficiency for each bin
- Return type:
- compute_kernels()[source]#
function to compute all the needed window functions.
Note
This does not return the window functions. They are found in the new attributes GC if galaxy clustering is asked for, and WL if cosmic sheer is asked for
- genwindow(z, obs, i)[source]#
generic function to obtain the window functions for the different observables.
- Parameters:
z (
numpy.ndarray) – array of redshifts for which the window function should be computedobs (
str) – name of the observable (GC or WL)i (
int) – integer of the redshift bin the window should be computed for
- Returns:
Values of the window function for the observable obs, for redshift bin i, and at redshifts z.
- Return type:
- computecls()[source]#
Function to compute the angular power spectrum for all observables, redshift bins and multipoles.
- Returns:
a dictionary containing all auto and cross correlation angular power spectra. Its keys are formatted to have an array of the power spectra in ‘X ixY j’. Also the multipoles for which the angular power spectra were computed for are found in ‘ells’.
- Return type:
Note
Implements the following equation:
\[C_{i,j}^{X,Y}(\ell) = c \int \mathrm{d}z \frac{W_i^X (z)W_j^Y (z)}{ H(z) r^2(z)} P_{\delta \delta} \big[\frac{\ell + 1/2}{r(z)} , z \big]\]
- computecls_vectorized()[source]#
Vectorized function to compute the angular power spectrum for all observables, redshift bins and multipoles.
- Returns:
a dictionary containing all auto and cross correlation angular power spectra. Its keys are formatted to have an array of the power spectra in ‘X ixY j’. Also the multipoles for which the angular power spectra were computed for are found in ‘ells’.
- Return type:
Note
Implements the following equation:
\[C_{i,j}^{X,Y}(\ell) = c \int \mathrm{d}z \frac{W_i^X (z)W_j^Y (z)}{ H(z) r^2(z)} P_{\delta \delta} \big[\frac{\ell + 1/2}{r(z)} , z \big]\]
- clsintegral(obs1, obs2, bin1, bin2, hub)[source]#
function to obtain the angular power spectrum as an function of the multipole.
- Parameters:
obs1 (
str) – name of the observable of the redshift bin bin1 (GC or WL)obs2 (
str) – name of the observable of the redshift bin bin2 (GC or WL)bin1 (
int) – index of the redshift bin at which the observable obs1 is measuredbin2 (
int) – index of the redshift bin at which the observable obs2 is measuredhub (
callable) – function that should be passed a numpy.ndarray of redshifts returns the hubble expansion rate at these redshifts.
- Returns:
Function that receives an array multipole and returns the angular power spectrum for these multipoles.
- Return type:
callable