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.
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 toTrue
, then the returned quantity therefore corresponds to the complex quantity \(|e|\exp{(\mathrm{i}\theta)}\) or its real and imaginary parts (depending on thecomponent
).References
Attributes Summary
The column name to get the xx shape component from.
The column name to get the xy shape component from.
The column name to get the yy shape component from.
Which component of the ellipticity to return.
The type of ellipticity to calculate (
str
, default'distortion'
)Divide the phase angle by 2? Suitable for quiver plots.
Methods Summary
__call__
(data, **kwargs)Call self as a function.
Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.Attributes Documentation
- component¶
Which component of the ellipticity to return. If
None
, return complex ellipticity values. (str
, defaultNone
)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})\)
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[Any, dtype[ScalarType]] | Scalar | HealSparseMap], **kwargs) ndarray[Any, dtype[ScalarType]] ¶
Call self as a function.
- getInputSchema() HealSparseMap]]] ¶
Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.- Returns:
- result
KeyedDataSchema
The schema this action requires to be present when calling this action, keys are unformatted.
- result