icecube / skyllh

https://icecube.github.io/skyllh/
GNU General Public License v3.0
11 stars 5 forks source link

Public data signal generation with Poisson=False does not always match the exact signal_ns number #180

Closed mskarl closed 9 months ago

mskarl commented 10 months ago

Tested this at TXS 0506+056 location. Generating signal events with analysis.sig_generator.generate_signal_events(rss, true_ns, poisson=False) does not always generate the number specified in true_ns (for example when true_ns is 49).

martwo commented 9 months ago

I was able to reproduce this bug.

martwo commented 9 months ago

The problem originates from a rounding error when calculating the number of signal events for an individual dataset: https://github.com/icecube/skyllh/blob/a4066a671036d1612ee5ed77cb58f820b40dcb71/skyllh/core/signal_generator.py#L398