generate_background
grb_trigger.simulations.generate_background(n_bins, lam_low=40, lam_high=15)Generate Poisson background counts for both energy channels.
Parameters
n_binsint-
Number of time bins.
lam_lowfloat, default 40-
Mean count per bin, low-energy channel.
lam_highfloat, default 15-
Mean count per bin, high-energy channel.
Returns
low, highnumpy.ndarray, shape (n_bins,)-
Background counts per channel.
Raises
- ValueError
-
If a rate is negative.
Examples
>>> low, high = generate_background(1000)>>> low.shape(1000,)