coincidence_HM.flag_duplicates_per_group_pair#
Back to Module page
Summary#
Picks a subset of pair_trigger_array such that each bucket of group_size in H1 and L1 has a unique \`coincident’ candidate. If a veto_mask is provided, defaults to preferentially keep in vetoed elements Note: The order of the input and output pair trigger array isn’t identical in the general case
Signature#
def flag_duplicates_per_group_pair(pair_trigger_array, group_size, c0_pos, origin = 0, veto_mask = None, extra_arrays = None, remove = False, score_func = utils.incoherent_score, **kwargs)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
n_trigger x 2 x len(processedclist) array with H1 and L1 triggers |
||
|
Bucket size (s) |
||
|
Index of c0 in the processedclists, used if remove == False |
||
|
0 |
Origin for bucketing (s) |
|
|
None |
If known, boolean mask of len(pair_trigger_array) with zeros at triggers that failed vetoes |
|
|
None |
If required, a list of arrays, each of size n_trigger, to dice up along with pair_trigger_array |
|
|
False |
If True, we remove the duplicates. Else we return a boolean mask that marks the duplicates with zeros |
|
|
utils.incoherent_score |
Function that takes in a pair of triggers and returns a scalar |
|
|
Extra arguments to score_func |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
|
Docstring#
Picks a subset of pair_trigger_array such that each bucket of group_size
in H1 and L1 has a unique `coincident' candidate. If a veto_mask is
provided, defaults to preferentially keep in vetoed elements
Note: The order of the input and output pair trigger array isn't identical
in the general case
:param pair_trigger_array:
n_trigger x 2 x len(processedclist) array with H1 and L1 triggers
:param group_size: Bucket size (s)
:param origin: Origin for bucketing (s)
:param veto_mask:
If known, boolean mask of len(pair_trigger_array) with zeros at triggers
that failed vetoes
:param extra_arrays:
If required, a list of arrays, each of size n_trigger, to dice up
along with pair_trigger_array
:param remove:
If True, we remove the duplicates. Else we return a boolean mask that
marks the duplicates with zeros
:param c0_pos: Index of c0 in the processedclists, used if remove == False
:param score_func:
Function that takes in a pair of triggers and returns a scalar
:param kwargs: Extra arguments to score_func
:return: 1. n_trigger_new x 2 x len(processedclist) array with
subset of maximized H1 and L1 triggers
2. If veto_mask is provided, subset of veto_mask of
size n_trigger_new (if provided in the first place)
3. If extra_arrays are provided, list with their subsets
4. if remove is False, n_trigger_new = n_trigger, and it returns
a n_trigger x 2 boolean mask with zeros at the eliminated
triggers in each detector