ranking_HM.add_to_bg_and_fg_dicts#
Back to Module page
Summary#
Populates events in lists of pure background, zero-lag candidates, LSC events, and injected events
Signature#
def add_to_bg_and_fg_dicts(events, loc_id, bg_fg_dicts, extra_arrays = (), separate_lsc_events = True, separate_injections = True, inj_ends = INJECTION_ENDS, inj_starts = INJECTION_STARTS, eps = 4, output_mask_inj = False)
Name |
Type |
Default |
Description |
|---|---|---|---|
|
Array of shape n_events x (n_det=2) x row of processedclist |
||
|
Tuple with (chirp_mass_id, subbank ID) |
||
|
List of dicts with pure background, zero-lag candidates, (and separate LSC events and injected events, if needed) |
||
|
() |
If known, iterable with extra arrays for the events (timeseries, veto_metadata, coherent scores) |
|
|
True |
Flag to collect lsc events separately |
|
|
True |
Flag to collect injections separately |
|
|
INJECTION_ENDS |
Array with end times of injections |
|
|
INJECTION_STARTS |
Array with start times of injections |
|
|
4 |
Tolerance for checking if an event is close to an injection |
|
|
False |
Flag to output the mask of injected events |
Output variables#
Return annotation |
Docstring type |
Description |
|---|---|---|
|
Adds an entry to each dict in bg_fg_dicts with key = loc_id, and item = events, or (events, timeseries) if we have timeseries |
Docstring#
Populates events in lists of pure background, zero-lag candidates,
LSC events, and injected events
:param events: Array of shape n_events x (n_det=2) x row of processedclist
:param loc_id: Tuple with (chirp_mass_id, subbank ID)
:param bg_fg_dicts:
List of dicts with pure background, zero-lag candidates,
(and separate LSC events and injected events, if needed)
:param extra_arrays:
If known, iterable with extra arrays for the events
(timeseries, veto_metadata, coherent scores)
:param separate_lsc_events: Flag to collect lsc events separately
:param separate_injections: Flag to collect injections separately
:param inj_ends: Array with end times of injections
:param inj_starts: Array with start times of injections
:param eps: Tolerance for checking if an event is close to an injection
:param output_mask_inj: Flag to output the mask of injected events
:return:
Adds an entry to each dict in bg_fg_dicts with key = loc_id, and
item = events, or (events, timeseries) if we have timeseries