MedianHistAction¶
- class lsst.analysis.tools.actions.scalar.MedianHistAction(*args, **kw)¶
Bases:
ScalarAction
Calculates the median of the given histogram data.
Attributes Summary
Key of frequency Vector (
str
)Key of bin midpoints Vector (
str
)Methods Summary
__call__
(data, **kwargs)Compute a scalar value from keyed data.
Return the schema an
AnalysisAction
expects to be present in the arguments supplied to the __call__ method.histMedian
(hist, bin_mid)Calculates the median of a histogram with binned values
Attributes Documentation
Methods Documentation
- __call__(data: MutableMapping[str, ndarray[Any, dtype[_ScalarType_co]] | Scalar | HealSparseMap | Tensor | Mapping], **kwargs)¶
Compute a scalar value from keyed data.
- Parameters:
- data
Keyed data to compute a value from.
- kwargs
Additional keyword arguments.
- Returns:
- A scalar value.
- getInputSchema() Mapping]]] ¶
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
- histMedian(hist, bin_mid)¶
Calculates the median of a histogram with binned values
- Parameters:
- hist
numpy.ndarray
Frequency array
- bin_mid
numpy.ndarray
Bin midpoints array
- hist
- Returns:
- median
float
Median of histogram with binned values
- median