SetSelector#
- class lsst.analysis.tools.actions.vector.SetSelector(*args, **kw)#
Bases:
SelectorBaseSelects rows with any number of column values within a given set.
For example, given a set of patches (1, 2, 3), and a set of columns (index_1, index_2), return all rows with either index_1 or index_2
in the set (1, 2, 3).
Notes#
The values are given as floats for flexibility. Integers above the floating point limit (2^53 + 1 = 9,007,199,254,740,993 for 64 bits) will not compare exactly with their float representations.
Attributes Summary
Key to use when populating plot info, ignored if empty string (
str, default'')The set of acceptable values (
List, default[])Keys to select from data (
List, default[])Methods Summary
__call__(data, **kwargs)Return a mask of rows with values in the specified set.
Return the schema an
AnalysisActionexpects to be present in the arguments supplied to the __call__ method.Attributes Documentation
- plotLabelKey#
Key to use when populating plot info, ignored if empty string (
str, default'')
- values#
The set of acceptable values (
List, default[])
- vectorKeys#
Keys to select from data (
List, default[])
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[tuple[Any, ...], dtype[_ScalarT]] | Scalar | HealSparseMap | Tensor | Mapping], **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]#
Return a mask of rows with values in the specified set.
Parameters#
data :
KeyedDataReturns#
- result
Vector A mask of the rows with values in the specified set.
- result
- getInputSchema() Iterable[tuple[str, type[ndarray[tuple[Any, ...], dtype[_ScalarT]]] | type[Scalar] | type[HealSparseMap] | type[Tensor] | type[Mapping]]]#
Return the schema an
AnalysisActionexpects 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