Skip to content

generate_grb_pulse

function grb_trigger.simulations

grb_trigger.simulations.generate_grb_pulse(duration_bins, amplitude, tau_rise=2.0, tau_decay=20.0, hardness_ratio=1.5)

Generate a GRB pulse with a fast rise and exponential decay.

Parameters

duration_bins int

Duration of the pulse in bins.

amplitude float

Peak count rate of the low channel.

tau_rise float, default 2.0

Rise time constant.

tau_decay float, default 20.0

Decay time constant (must be >= tau_rise).

hardness_ratio float, default 1.5

High/low channel rate ratio, in [1.0, 2.5].

Returns

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

Poisson-sampled counts per channel.

Raises

ValueError

If an argument is outside its allowed range.

Notes

The low-channel rate is

r(t)=A (1−e−t/τr) e−t/τdr(t) = A\,(1 - e^{-t/\tau_r})\,e^{-t/\tau_d}

and the high channel is hardness_ratio * r(t).