icecube / i3mla

Public IceCube point-source analysis tools
Apache License 2.0
2 stars 1 forks source link

GRL not handled correctly #46

Closed thejevans closed 3 years ago

thejevans commented 3 years ago

Currently, the way we are using the GRL is by generating a trial assuming only the time profiles for time distribution, and then removing events not in good runs. This causes a bit of a headache when trying to inject a set number of signal events.

@mjlarson uses a different method in his package that I would like to implement here. The new process would be as follows:

  1. generate background events
  2. treat the good run list as a set of uniform distributions with different start and stop times, weighted relative to each other based on the event rates in each run.
  3. multiply the the integrals of the good run list distributions and the background time profile distribution together to get probabilities for each run
  4. for each event, randomly choose a run based on those probabilities to put the event into
  5. then, for each run, use inverse transform sampling to randomly distribute the events in the run

This way, the injected signal is exactly what we expect, and this gives a coarse-grained accounting for the seasonal variation.

thejevans commented 3 years ago

fixed in better grl