Closed martwo closed 1 year ago
Events that fall between the declination range limit in the Improved PS analysis (-5deg) and the KDE range limit (-10deg) don't raise any error. However, they get an unreasonably small background PDF value. They usually end up being the events with the highest SoB in a trial, thus dominating the final TS value.
https://github.com/icecube/skyllh/blob/074c50891a7b9ecedcb5fef65af6a5b7126cb1b5/skyllh/core/signal_generator.py#L692-L694
The call to the
signal_event_post_sampling_processing
method might rotate a signal event's declination coordinate outside the supported PDF range, thus causing a ValueError likeValueError: Some of the trial data for PDF axis "sin_dec" is outof range (-0.173648,1)! Data values out of range: [-0.19094235]
, especially for sources very close to the PDF boundary.The solution would be to check if the reco coordinates are within the PDF allowed range and if not, discard that particular event and draw a new event until the requirements are met. This would require to be able to specify the event property ranges at the construction time of the "MCMultiDatasetSignalGenerator" instance.