SetSelector

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

Bases: SelectorBase

Selects 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

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 Summary

__call__(data, **kwargs)

Return a mask of rows with values in the specified set.

getInputSchema()

Return the schema an AnalysisAction expects 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[int, ...], dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping], **kwargs) ndarray[tuple[int, ...], dtype[_ScalarType_co]]

Return a mask of rows with values in the specified set.

Parameters:
dataKeyedData
Returns:
resultVector

A mask of the rows with values in the specified set.

getInputSchema() Mapping]]]

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.