clmm.utils.ellipticity module
General utility functions that are used in multiple modules
- clmm.utils.ellipticity.build_ellipticities(q11, q22, q12)[source]
Build ellipticties from second moments. See, e.g., Schneider et al. (2006)
- Parameters:
q11 (float, numpy.ndarray) -- Second brightness moment tensor, component (1,1)
q22 (float, numpy.ndarray) -- Second brightness moment tensor, component (2,2)
q12 (float, numpy.ndarray) -- Second brightness moment tensor, component (1,2)
- Returns:
chi1, chi2 (float, numpy.ndarray) -- Ellipticities using the "chi definition"
epsilon1, epsilon2 (float, numpy.ndarray) -- Ellipticities using the "epsilon definition"
- clmm.utils.ellipticity.compute_lensed_ellipticity(ellipticity1_true, ellipticity2_true, shear1, shear2, convergence)[source]
Compute lensed ellipticities from the intrinsic ellipticities, shear and convergence. Following Schneider et al. (2006)
\[\epsilon^{\text{lensed}}=\epsilon^{\text{lensed}}_1+i\epsilon^{\text{lensed}}_2= \frac{\epsilon^{\text{true}}+g}{1+g^\ast\epsilon^{\text{true}}},\]where, the complex reduced shear \(g\) is obtained from the shear \(\gamma=\gamma_1+i\gamma_2\) and convergence \(\kappa\) as \(g = \gamma/(1-\kappa)\), and the complex intrinsic ellipticity is \(\epsilon^{\text{ true}}=\epsilon^{\text{true}}_1+i\epsilon^{\text{true}}_2\)
- Parameters:
ellipticity1_true (float, numpy.ndarray) -- Intrinsic ellipticity of the sources along the principal axis
ellipticity2_true (float, numpy.ndarray) -- Intrinsic ellipticity of the sources along the second axis
shear1 (float, numpy.ndarray) -- Shear component (not reduced shear) along the principal axis at the source location
shear2 (float, numpy.ndarray) -- Shear component (not reduced shear) along the 45-degree axis at the source location
convergence (float, numpy.ndarray) -- Convergence at the source location
- Returns:
e1, e2 -- Lensed ellipicity along both reference axes.
- Return type:
float, numpy.ndarray
- clmm.utils.ellipticity.convert_shapes_to_epsilon(shape_1, shape_2, shape_definition='epsilon', kappa=0)[source]
Convert shape components 1 and 2 appropriately to make them estimators of the reduced shear once averaged. The shape 1 and 2 components may correspond to ellipticities according the \(\epsilon\)- or \(\chi\)-definition, but also to the 1 and 2 components of the shear. See Bartelmann & Schneider 2001 for details (https://arxiv.org/pdf/astro-ph/9912508.pdf).
The \(\epsilon\)-ellipticity is a direct estimator of the reduced shear. The shear \(\gamma\) may be converted to reduced shear \(g\) if the convergence \(\kappa\) is known. The conversions are given below.
\[\epsilon = \frac{\chi}{1+(1-|\chi|^2)^{1/2}}\]\[g=\frac{\gamma}{1-\kappa}\]If shape_definition = 'chi', this function returns the corresponding epsilon ellipticities
If shape_definition = 'shear', it returns the corresponding reduced shear, given the convergence kappa
If shape_definition = 'epsilon' or 'reduced_shear', it returns them as is as no conversion is needed.
- Parameters:
shape_1 (float, numpy.ndarray) -- Input shapes or shears along principal axis (g1 or e1)
shape_2 (float, numpy.ndarray) -- Input shapes or shears along secondary axis (g2 or e2)
shape_definition (str, optional) -- Definition of the input shapes, can be ellipticities 'epsilon' or 'chi' or shears 'shear' or 'reduced_shear'. Defaut: 'epsilon'
kappa (float, numpy.ndarray, optional) -- Convergence for transforming to a reduced shear. Default is 0
- Returns:
epsilon_1 (float, numpy.ndarray) -- Epsilon ellipticity (or reduced shear) along principal axis (epsilon1)
epsilon_2 (float, numpy.ndarray) -- Epsilon ellipticity (or reduced shear) along secondary axis (epsilon2)