clmm.theory.generic module

@file generic.py Model independent theory functions

clmm.theory.generic.compute_magnification_bias_from_magnification(magnification, alpha)[source]

Computes magnification bias from magnification \(\mu\) and slope parameter \(\alpha\) as :

\[\mu^{\alpha - 1}\]

The alpha parameter depends on the source sample and is computed as the slope of the cummulative numer counts at a given magnitude:

\[\alpha \equiv \alpha(f) = - \frac{\mathrm d}{\mathrm d \log{f}} \log{n_0(>f)}\]

or,

\[\alpha \equiv \alpha(m) = 2.5 \frac{\mathrm d}{\mathrm d m} \log{n_0(<m)}\]

see e.g. Bartelmann & Schneider 2001; Umetsu 2020

Parameters:
  • magnification (array_like) -- Magnification

  • alpha (array like) -- Source cummulative number density slope

Returns:

magnification bias -- magnification bias

Return type:

array_like

clmm.theory.generic.compute_profile_mass_in_radius(r3d, redshift, cosmo, mdelta, cdelta, massdef='mean', delta_mdef=200, halo_profile_model='nfw', alpha=None)[source]

Computes the mass inside a given radius of the profile. The mass is calculated as

\[M(<\text{r3d}) = M_{\Delta}\; \frac{f\left(\frac{\text{r3d}}{r_{\Delta}/c_{\Delta}}\right)}{f(c_{\Delta})},\]

where \(f(x)\) for the different models are

NFW:

\[\quad \ln(1+x)-\frac{x}{1+x}\]

Einasto: (\(\gamma\) is the lower incomplete gamma function)

\[\gamma(\frac{3}{\alpha}, \frac{2}{\alpha}x^{\alpha})\]

Hernquist:

\[\left(\frac{x}{1+x}\right)^2\]
Parameters:
  • r3d (array_like, float) -- Radial position from the cluster center in \(M\!pc\).

  • refshift (float) -- Redshift of the cluster

  • mdelta (float) -- Mass of the profile in units of \(M_\odot\)

  • cdelta (float) -- Concentration of the profile.

  • massdef (str, None) -- Profile mass definition ("mean", "critical", "virial").

  • delta_mdef (int, None) -- Mass overdensity definition.

  • halo_profile_model (str) -- Profile model parameterization ("nfw", "einasto", "hernquist").

  • alpha (float, None) -- Einasto slope, required when halo_profile_model='einasto'.

Returns:

Mass in units of \(M_\odot\)

Return type:

array_like, float

clmm.theory.generic.compute_rdelta(mdelta, redshift, cosmo, massdef='mean', delta_mdef=200)[source]

Computes the radius for mdelta

\[r_\Delta=\left(\frac{3 M_\Delta}{4 \pi \Delta \rho_{bkg}(z)}\right)^{1/3}\]
Parameters:
  • mdelta (float) -- Mass in units of \(M_\odot\)

  • redshift (float) -- Redshift of the cluster

  • cosmo (clmm.Cosmology) -- Cosmology object

  • massdef (str, None) -- Profile mass definition ("mean", "critical", "virial").

  • delta_mdef (int, None) -- Mass overdensity definition.

Returns:

Radius in \(M\!pc\).

Return type:

float

clmm.theory.generic.compute_reduced_shear_from_convergence(shear, convergence)[source]

Calculates reduced shear from shear and convergence

Parameters:
  • shear (array_like, float) -- Shear

  • convergence (array_like, float) -- Convergence

Returns:

g -- Reduced shear

Return type:

array_like, float

clmm.theory.generic.convert_profile_mass_concentration(mdelta, cdelta, redshift, cosmo, massdef, delta_mdef, halo_profile_model, massdef2=None, delta_mdef2=None, halo_profile_model2=None, alpha=None, alpha2=None)[source]
Parameters:
  • mdelta (float) -- Mass of the profile in units of \(M_\odot\)

  • cdelta (float) -- Concentration of the profile.

  • refshift (float) -- Redshift of the cluster

  • cosmo (clmm.Cosmology) -- Cosmology object

  • massdef (str, None) -- Input profile mass definition ("mean", "critical", "virial").

  • delta_mdef (int, None) -- Input mass overdensity definition.

  • halo_profile_model (str, None) -- Input profile model parameterization ("nfw", "einasto", "hernquist").

  • massdef2 (str, None) -- Profile mass definition to convert to ("mean", "critical", "virial"). If None, massdef2=massdef.

  • delta_mdef2 (int, None) -- Mass overdensity definition to convert to. If None, delta_mdef2=delta_mdef.

  • halo_profile_model2 (str, None) -- Profile model parameterization to convert to ("nfw", "einasto", "hernquist"). If None, halo_profile_model2=halo_profile_model.

  • alpha (float, None) -- Input Einasto slope when halo_profile_model='einasto'.

  • alpha2 (float, None) -- Einasto slope to convert to when halo_profile_model='einasto'. If None, alpha2=alpha.

Returns:

HaloProfile object

Return type:

HaloProfile