MagSelector#
- class lsst.analysis.tools.actions.vector.MagSelector(*args, **kw)#
Bases:
SelectorBaseSelects points that have minMag < mag (AB) < maxMag.
The magnitude is based on the given fluxType.
Attributes Summary
The band(s) to apply the magnitude cut in.
Flux type to calculate the magnitude in.
Astropy unit of flux vector (
str, default'nJy')Maximum mag to include in the sample.
Minimum mag to include in the sample.
Key to use when populating plot info, ignored if empty string (
str, default'')Use millimags or not? (
bool, defaultFalse)Methods Summary
__call__(data, **kwargs)Make a mask of that satisfies self.minMag < mag < self.maxMag.
Return the schema an
AnalysisActionexpects 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, default1000000.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, defaultFalse)
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[tuple[Any, ...], dtype[_ScalarT]] | Scalar | HealSparseMap | Tensor | Mapping], **kwargs) ndarray[tuple[Any, ...], dtype[_ScalarT]]#
Make a mask of that satisfies self.minMag < mag < self.maxMag.
The magnitude is based on the flux in self.fluxType.
Parameters#
- data
KeyedData The data to perform the magnitude selection on.
Returns#
- result
Vector A mask of the objects that satisfy the given magnitude cut.
- data
- 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