You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When injecting events in an analysis instance with the option kde_smoothing=True, it can happen sometimes that the kde smoothing assigns extremely low values to the bkg pdf, of the order of 1e-200 or lower. This can produce for some injected events to run in an overflow when computing the pdf ratio.
f'For {len(ev_idxs)} events the background probability is '
f'zero. The event indices of these events are: {ev_idxs}')
np.divide(
ratio,
bkg_pd,
where=m_nonzero_bkg,
out=ratio)
The m_nonzero_bkg = bkg_pd > 0 is not enough when appliying kde smoothing. I suggest to change it to m_nonzero_bkg = bkg_pd > np.finfo(np.double).resolution . This will assign this close to 0 values the same treatment as expected with no kde smoothing.
The text was updated successfully, but these errors were encountered:
When injecting events in an analysis instance with the option kde_smoothing=True, it can happen sometimes that the kde smoothing assigns extremely low values to the bkg pdf, of the order of 1e-200 or lower. This can produce for some injected events to run in an overflow when computing the pdf ratio.
In the current implementation we have
skyllh/skyllh/analyses/i3/publicdata_ps/pdfratio.py
Lines 216 to 228 in 6704ef9
The
m_nonzero_bkg = bkg_pd > 0
is not enough when appliying kde smoothing. I suggest to change it tom_nonzero_bkg = bkg_pd > np.finfo(np.double).resolution
. This will assign this close to 0 values the same treatment as expected with no kde smoothing.The text was updated successfully, but these errors were encountered: