CalcE

class lsst.analysis.tools.actions.vector.CalcE(*args, **kw)

Bases: VectorAction

Calculate a complex value representation of the ellipticity.

The complex ellipticity is typically defined as:

\[\begin{split}e &= |e|\exp{(\mathrm{i}2\theta)} = e_1+\mathrm{i}e_2, \\ &= \frac{(I_{xx} - I_{yy}) + \mathrm{i}2I_{xy}}{I_{xx} + I_{yy}},\end{split}\]

where \(\mathrm{i}\) is the square root of -1 and \(I_{xx}\), \(I_{yy}\), and \(I_{xy}\) are second-order central moments. This is sometimes referred to as distortion, and denoted in GalSim by \(e=(e_1,e_2)\) (see Eq. 4.4. of Bartelmann and Schneider, 2001 [1]). The other definition differs in normalization. It is referred to as shear, and denoted by \(g=(g_{1},g_{2})\) in GalSim (see Eq. 4.10 of Bartelmann and Schneider, 2001 [1]). It is defined as

\[g = \frac{(I_{xx} - I_{yy}) + \mathrm{i}2I_{xy}} {I_{xx} + I_{yy} + 2\sqrt{(I_{xx}I_{yy}-I_{xy}^{2})}}.\]

The shear measure is unbiased in weak-lensing shear, but may exclude some objects in the presence of noisy moment estimates. The distortion measure is biased in weak-lensing distortion, but does not suffer from selection artifacts.

See also

CalcE1
CalcE2

Notes

1. This is a shape measurement used for doing QA on the ellipticity of the sources.

2. For plotting purposes we might want to plot quivers whose lengths are proportional to \(|e|\) and whose angles correspond to \(\theta\). If halvePhaseAngle config parameter is set to True, then the returned quantity therefore corresponds to the complex quantity \(|e|\exp{(\mathrm{i}\theta)}\) or its real and imaginary parts (depending on the component).

References

[1] (1,2)

Bartelmann, M. and Schneider, P., “Weak gravitational lensing”, Physics Reports, vol. 340, no. 4–5, pp. 291–472, 2001. doi:10.1016/S0370-1573(00)00082-X; https://arxiv.org/abs/astro-ph/9912508

Attributes Summary

colXx

The column name to get the xx shape component from.

colXy

The column name to get the xy shape component from.

colYy

The column name to get the yy shape component from.

component

Which component of the ellipticity to return.

ellipticityType

The type of ellipticity to calculate (str, default 'distortion')

halvePhaseAngle

Divide the phase angle by 2? Suitable for quiver plots.

Methods Summary

__call__(data, **kwargs)

Call self as a function.

getInputSchema()

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

Attributes Documentation

colXx

The column name to get the xx shape component from. (str, default '{band}_ixx')

colXy

The column name to get the xy shape component from. (str, default '{band}_ixy')

colYy

The column name to get the yy shape component from. (str, default '{band}_iyy')

component

Which component of the ellipticity to return. If None, return complex ellipticity values. (str, default None)

Allowed values:

'1'

\(e_1\) or \(g_1\) (depending on ellipticityType)

'2'

\(e_2\) or \(g_2\) (depending on ellipticityType)

'None'

\(e_1 + \mathrm{i}e_2\) or \(g_1 + \mathrm{i}g_2\) (depending on ellipticityType)

ellipticityType

The type of ellipticity to calculate (str, default 'distortion')

Allowed values:

'distortion'

Distortion, defined as \((I_{xx}-I_{yy}+\mathrm{i}2I_{xy})/(I_{xx}+I_{yy})\)

'shear'

Shear, defined as \((I_{xx}-I_{yy}+\mathrm{i}2I_{xy})/(I_{xx}+I_{yy}+2\sqrt{I_{xx}I_{yy}-I_{xy}^2})\)

halvePhaseAngle

Divide the phase angle by 2? Suitable for quiver plots. (bool, default False)

Methods Documentation

__call__(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap | Tensor], **kwargs) ndarray[Any, dtype[ScalarType]]

Call self as a function.

getInputSchema() Tensor]]]

Return the schema an AnalysisAction expects to be present in the arguments supplied to the __call__ method.

Returns:
resultKeyedDataSchema

The schema this action requires to be present when calling this action, keys are unformatted.