threeML.utils.bayesian_blocks module
- threeML.utils.bayesian_blocks.bayesian_blocks(tt, ttstart, ttstop, p0, bkg_integral_distribution=None)[source]
Divide a series of events characterized by their arrival time in blocks of perceptibly constant count rate. If the background integral distribution is given, divide the series in blocks where the difference with respect to the background is perceptibly constant.
- Parameters:
tt – arrival times of the events
ttstart – the start of the interval
ttstop – the stop of the interval
p0 – the false positive probability. This is used to decide the penalization on the likelihood, so this
parameter affects the number of blocks :param bkg_integral_distribution: (default: None) If given, the algorithm account for the presence of the background and finds changes in rate with respect to the background :return: the np.array containing the edges of the blocks