Skip to content

generate_background

function grb_trigger.simulations

grb_trigger.simulations.generate_background(n_bins, lam_low=40, lam_high=15)

Generate Poisson background counts for both energy channels.

Parameters

n_bins int

Number of time bins.

lam_low float, default 40

Mean count per bin, low-energy channel.

lam_high float, default 15

Mean count per bin, high-energy channel.

Returns

low, high numpy.ndarray, shape (n_bins,)

Background counts per channel.

Raises

ValueError

If a rate is negative.

Examples

>>> low, high = generate_background(1000)
>>> low.shape
(1000,)