-
Notifications
You must be signed in to change notification settings - Fork 9
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
Retrieve energies of triggered events from dl1 parameters #188
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #188 +/- ##
==========================================
+ Coverage 63.15% 63.19% +0.03%
==========================================
Files 21 21
Lines 2717 2733 +16
==========================================
+ Hits 1716 1727 +11
- Misses 1001 1006 +5
☔ View full report in Codecov by Sentry. |
Just a note: you might want to migrate to using |
Is |
Yes, it's basically kept up to date with changes to the ctapipe model (though it's only loosly tied - it doesn't care about the contents of the tables, but the table names do assume ctapipe conventions. The best would be just to swap any write function in lstchain with Alternately, you should a least use |
ctaplot/gammaboard/gammaboard.py
Outdated
for obs_id in np.unique(dl1_params['obs_id']): | ||
mask = dl1_params['obs_id'] == obs_id | ||
dl1_filtered = dl1_params[mask] | ||
_, indices = np.unique(dl1_filtered['event_id'], | ||
return_index=True) | ||
trig_energies.append(dl1_filtered['mc_energy'][indices]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
similar to our discussion, this can be simplified using axis
mask = np.unique(dl1_params[['obs_id', 'event_id']], axis=0, return_index=True)
trig_energies = dl1_params['mc_energy'][mask]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
These energies allow for a computation of the max effective area.