clmm.utils.beta_lens module
General utility functions that are used in multiple modules
- clmm.utils.beta_lens.compute_beta(z_src, z_cl, cosmo)[source]
Geometric lensing efficicency
\[\beta = max(0, D_{a,\ ls}/D_{a,\ s})\]Eq.2 in https://arxiv.org/pdf/1611.03866.pdf
- Parameters:
z_src (float, array_like) -- Source galaxy redshift
z_cl (float) -- Galaxy cluster redshift
cosmo (clmm.Cosmology) -- CLMM Cosmology object
- Returns:
Geometric lensing efficicency
- Return type:
float, array
- clmm.utils.beta_lens.compute_beta_s(z_src, z_cl, z_inf, cosmo)[source]
Geometric lensing efficicency ratio
\[\beta_s = \beta(z_{src})/\beta(z_{inf})\]- Parameters:
z_src (float, array_like) -- Source galaxy redshift
z_cl (float) -- Galaxy cluster redshift
z_inf (float) -- Redshift at infinity
cosmo (clmm.Cosmology) -- CLMM Cosmology object
- Returns:
Geometric lensing efficicency ratio
- Return type:
numpy array
- clmm.utils.beta_lens.compute_beta_s_func(z_src, z_cl, z_inf, cosmo, func, *args, **kwargs)[source]
Geometric lensing efficicency ratio times a value of a function
\[\beta_{s}\times \text{func} = \beta_s(z_{src}, z_{cl}, z_{inf}) \times\text{func}(*args,\ **kwargs)\]- Parameters:
z_src (array_like, float, function) -- Information on the background source galaxy redshift(s). Value required depends on z_src_info (see below).
z_cl (float) -- Galaxy cluster redshift
z_inf (float) -- Redshift at infinity
cosmo (clmm.Cosmology) -- CLMM Cosmology object
func (callable) -- A scalar function
*args (positional arguments) -- args to be passed to func
**kwargs (keyword arguments) -- kwargs to be passed to func
- Returns:
Geometric lensing efficicency ratio for each source
- Return type:
numpy array
- clmm.utils.beta_lens.compute_beta_s_mean_from_distribution(z_cl, z_inf, cosmo, zmax=10.0, delta_z_cut=0.1, zmin=None, z_distrib_func=None)[source]
Mean value of the geometric lensing efficicency
\[\left<\beta_s\right> = \frac{\int_{z = z_{min}}^{z_{max}}\beta_s(z)N(z)} {\int_{z = z_{min}}^{z_{max}}N(z)}\]- Parameters:
z_cl (float) -- Galaxy cluster redshift
z_inf (float) -- Redshift at infinity
cosmo (clmm.Cosmology) -- CLMM Cosmology object
zmax (float, optional) -- Maximum redshift to be set as the source of the galaxy when performing the sum. Default: 10
delta_z_cut (float, optional) -- Redshift interval to be summed with \(z_{cl}\) to return \(z_{min}\). This feature is not used if \(z_{min}\) is provided by the user. Default: 0.1
zmin (float, None, optional) -- Minimum redshift to be set as the source of the galaxy when performing the sum. Default: None
z_distrib_func (one-parameter function, optional) -- Redshift distribution function. Default is Chang et al (2013) distribution function.
- Returns:
Mean value of the geometric lensing efficicency
- Return type:
float
- clmm.utils.beta_lens.compute_beta_s_mean_from_weights(z_src, z_cl, z_inf, cosmo, shape_weights)[source]
Mean square value of the geometric lensing efficicency ratio
\[\left<\beta_s\right> =\frac{\sum_i \beta_s(z_i)w_i} {\sum_i w_i}\]- Parameters:
z_src (float, array_like) -- Invididual source galaxies redshift.
z_cl (float) -- Galaxy cluster redshift.
z_inf (float) -- Redshift at infinity.
cosmo (clmm.Cosmology) -- CLMM Cosmology object
shape_weights (float, array_like) -- Individual source galaxies shape weights.If not None, the function uses Eq.(13) fromhttps://arxiv.org/pdf/1611.03866.pdf with evenly distributedweights summing to one.
- Returns:
Mean value of the geometric lensing efficicency ratio.
- Return type:
float
- clmm.utils.beta_lens.compute_beta_s_square_mean_from_distribution(z_cl, z_inf, cosmo, zmax=10.0, delta_z_cut=0.1, zmin=None, z_distrib_func=None)[source]
Mean square value of the geometric lensing efficicency ratio
\[\left<\beta_s^2\right> =\frac{\int_{z = z_{min}}^{z_{max}}\beta_s^2(z)N(z)} {\int_{z = z_{min}}^{z_{max}}N(z)}\]- Parameters:
z_cl (float) -- Galaxy cluster redshift
z_inf (float) -- Redshift at infinity
cosmo (clmm.Cosmology) -- CLMM Cosmology object
zmax (float) -- Minimum redshift to be set as the source of the galaxywhen performing the sum.
delta_z_cut (float) -- Redshift interval to be summed with $z_cl$ to return$zmin$. This feature is not used if $z_min$ is provided by the user.
zmin (float, None, optional) -- Minimum redshift to be set as the source of the galaxy when performing the sum. Default: None
z_distrib_func (one-parameter function, optional) -- Redshift distribution function. Default is Chang et al (2013) distribution function.
- Returns:
Mean square value of the geometric lensing efficicency ratio.
- Return type:
float
- clmm.utils.beta_lens.compute_beta_s_square_mean_from_weights(z_src, z_cl, z_inf, cosmo, shape_weights)[source]
Mean square value of the geometric lensing efficicency ratio
\[\left<\beta_s^2\right> =\frac{\sum_i \beta_s^2(z_i)w_i} {\sum_i w_i}\]- Parameters:
z_src (float, array_like) -- Invididual source galaxies redshift.
z_cl (float) -- Galaxy cluster redshift.
z_inf (float) -- Redshift at infinity.
cosmo (clmm.Cosmology) -- CLMM Cosmology object
shape_weights (float, array_like) -- Individual source galaxies shape weights.
- Returns:
Mean square value of the geometric lensing efficicency ratio.
- Return type:
float