Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 219 #220

Merged
merged 1 commit into from
Mar 12, 2024
Merged

Fix 219 #220

merged 1 commit into from
Mar 12, 2024

Conversation

tomaskontrimas
Copy link
Collaborator

@tomaskontrimas tomaskontrimas commented Mar 11, 2024

Apply mask to events_meta as we initially draw events from all datasets and signal_event_post_sampling_processing expects the same shape of events_meta and events arrays.

Fixes #219 issue. It does not change the signal injection behaviour when events fall within valid event field ranges (e.g. declination range after events rotation). Trials would fail when generating signal for analyses with multi datasets and/or multi source hypothesis groups.

It follows the same logic as in the initial signal events drawing in L886-897:

ds_shg_mask = ds_mask & shg_mask
shg_sig_events_meta = sig_events_meta[ds_shg_mask]
n_shg_sig_events = len(shg_sig_events_meta)
ev_idx = shg_sig_events_meta['ev_idx']
# Get the signal MC events of the current dataset and source
# hypothesis group.
shg_sig_events = mc[ev_idx]
# Do the signal event post sampling processing.
shg_sig_events = shg.sig_gen_method.\
signal_event_post_sampling_processing(
shg, shg_sig_events_meta, shg_sig_events)

…sets and `signal_event_post_sampling_processing` expects same shape `events_meta` and `events` arrays.

It follows the same logic as in the initial signal events drawing in L886-897.
@tomaskontrimas tomaskontrimas self-assigned this Mar 11, 2024
@tomaskontrimas
Copy link
Collaborator Author

tomaskontrimas commented Mar 11, 2024

Oops, I guess analysis unit tests https://github.com/icecube/i3skyllh/actions/runs/8241075808 fail due to the livetime calculation change before the v24.1.0 release (see the test on master/v24.1.0 https://github.com/icecube/i3skyllh/actions/runs/8241246057/job/22538113710).

Let's fix them first, before merging this fix.

@martwo
Copy link
Collaborator

martwo commented Mar 12, 2024

Good catch! Thanks for fixing this.

@tomaskontrimas tomaskontrimas marked this pull request as ready for review March 12, 2024 09:29
@tomaskontrimas tomaskontrimas merged commit c902dd6 into master Mar 12, 2024
4 checks passed
@tomaskontrimas tomaskontrimas deleted the fix219 branch March 12, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error using NTv5p2 in stacking
2 participants