MagSelector

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

Bases: SelectorBase

Selects points that have minMag < mag (AB) < maxMag.

The magnitude is based on the given fluxType.

Attributes Summary

bands

The band(s) to apply the magnitude cut in.

fluxType

Flux type to calculate the magnitude in.

fluxUnit

Astropy unit of flux vector (str, default 'nJy')

maxMag

Maximum mag to include in the sample.

minMag

Minimum mag to include in the sample.

plotLabelKey

Key to use when populating plot info, ignored if empty string (str, default '')

returnMillimags

Use millimags or not? (bool, default False)

Methods Summary

__call__(data, **kwargs)

Make a mask of that satisfies self.minMag < mag < self.maxMag.

getInputSchema()

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

Attributes Documentation

bands

The band(s) to apply the magnitude cut in. Takes precedence if bands passed to call. (List, default [])

fluxType

Flux type to calculate the magnitude in. (str, default '{band}_psfFlux')

fluxUnit

Astropy unit of flux vector (str, default 'nJy')

maxMag

Maximum mag to include in the sample. (float, default 1000000.0)

minMag

Minimum mag to include in the sample. (float, default -1000000.0)

plotLabelKey

Key to use when populating plot info, ignored if empty string (str, default '')

returnMillimags

Use millimags or not? (bool, default False)

Methods Documentation

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

Make a mask of that satisfies self.minMag < mag < self.maxMag.

The magnitude is based on the flux in self.fluxType.

Parameters:
dataKeyedData

The data to perform the magnitude selection on.

Returns:
resultVector

A mask of the objects that satisfy the given magnitude cut.

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.