evaluate_binned_cut
- pyirf.cuts.evaluate_binned_cut(values, bin_values, cut_table, op)[source]
Evaluate a binned cut as defined in cut_table on given events.
Events with bin_values outside the bin edges defined in cut table will be set to False.
- Parameters:
- values: ``~numpy.ndarray`` or ``~astropy.units.Quantity``
The values on which the cut should be evaluated
- bin_values: ``~numpy.ndarray`` or ``~astropy.units.Quantity``
The values used to sort the
values
into bins- cut_table: ``~astropy.table.Table``
A table describing the binned cuts, e.g. as created by
~pyirf.cuts.calculate_percentile_cut
. Required columns: - low: lower edges of the bins - high: upper edges of the bins, - cut: cut value- op: callable(a, b) -> bool
A function taking two arguments, comparing element-wise and returning an array of booleans. Must support vectorized application.
- Returns:
- result: np.ndarray[bool]
A mask for each entry in
values
indicating if the event passes the bin specific cut given in cut table.