Closed mlincett closed 1 year ago
The sampling of event times is now implemented and the background test statistic is kind of meaningful. However it seems that the background events are spilling in the detector "off" periods.
I suspect this is an artifact from the CDF sampling and subsequent interpolation in the generic TimePDF
:
https://github.com/icecube/flarestack/blob/290f4b9ef62e4e1c5d2c88eb4fe219496da389e1/flarestack/core/time_pdf.py#L177-L188
The evaluation over 10k points is too coarse and when interpolated will yield a non-zero probability to times in the off periods.
The method TimePDF.inverse_interpolate()
has been renamed to inverse_cumulative()
. This is reimplemented in DetectorOnOffList
based on the native livetime_to_mjd()
of the subclass.
I have tested the generated time and their distribution is consistent with the on-off PDF.
Thanks! You say you did a test to show that the simulation of times works. Could you upload a plot of that for future reference?
Good idea indeed. Here is a set of randomly selected gaps in the livetime and the distribution of the simulated events on top.
I have also added a notebook to reproduce this.
PR to introduce simulation of event times for MC background in NorthernTracks.
Adds
signal_integral()
toDetectorOnOffList
which in turn is used bygenerate_times()
. Pretty straightforward.Need to double check the generated times to verify they are as expected.