Skip to content

detector_counts

function grb_trigger.simulations

grb_trigger.simulations.detector_counts(bkg, events)

Inject events into a background time series.

Parameters

bkg tuple of numpy.ndarray

(low, high) background counts.

events list of dict

Each dict has the keys "signal" ((low, high) arrays), "start_bin" (int, > 0), "type" (str, e.g. "grb") and optionally "is_grb" (0 or 1).

Returns

low, high numpy.ndarray

Copies of the background with all events added.

Raises

ValueError

If events is empty, channel lengths differ, an event does not fit in the background, or start_bin is not positive.

See Also