FracThreshold

class lsst.analysis.tools.actions.scalar.FracThreshold(*args, **kw)

Bases: ScalarAction

Compute the fraction of a distribution that is above or below a specified threshold. The operator is specified as a string, for example, “lt”, “le”, “ge”, “gt” for the mathematical operations <, <=, >=, >. To compute the fraction of elements with values less than a given threshold, use op=”le”.

Attributes Summary

op

Operator name string.

percent

Express result as percentage (bool, default False)

threshold

Threshold to apply.

vectorKey

Name of column (str)

Methods Summary

__call__(data, **kwargs)

Call self as a function.

getInputSchema()

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

Attributes Documentation

op

Operator name string. (str, default None)

Allowed values:

'lt'

less than threshold

'le'

less than or equal to threshold

'ge'

greater than or equal to threshold

'gt'

greater than threshold

'None'

Field is optional

percent

Express result as percentage (bool, default False)

threshold

Threshold to apply. (float)

vectorKey

Name of column (str)

Methods Documentation

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

Call self as a function.

getInputSchema() HealSparseMap]]]

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.