QualityQuery

class ctapipe.core.QualityQuery(**kwargs)[source]

Bases: ctapipe.core.component.Component

Manages a set of user-configurable (at runtime or in a config file) selection criteria that operate on the same type of input. Each time it is called, it returns a boolean array of whether or not each criterion passed. It also keeps track of the total number of times each criterium is passed, as well as a cumulative product of criterium (i.e. the criteria applied in-order)

Attributes Summary

quality_criteria

An instance of a Python list.

Methods Summary

__call__(value)

Test that value passes all cuts

to_table([functions])

Return a tabular view of the latest quality summary

Attributes Documentation

quality_criteria

An instance of a Python list.

Methods Documentation

__call__(value)numpy.ndarray[source]

Test that value passes all cuts

Parameters
value:

the value to pass to each selection function

Returns
np.ndarray:

array of booleans with results of each selection criterion in order

to_table(functions=False)[source]

Return a tabular view of the latest quality summary

The columns are - criteria: name of each criterion - counts: counts of each criterion independently - cum_counts: counts of cumulative application of each criterion in order

Parameters
functions: bool:

include the function string as a column

Returns
astropy.table.Table