-
Notifications
You must be signed in to change notification settings - Fork 77
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
Computation of pointing-dependent weights for MC events #1259
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1259 +/- ##
==========================================
+ Coverage 73.05% 73.27% +0.22%
==========================================
Files 134 134
Lines 14039 14081 +42
==========================================
+ Hits 10256 10318 +62
+ Misses 3783 3763 -20 ☔ View full report in Codecov by Sentry. |
Gammaness cut is 0.5 for the standard, and tuned to get the same amount of events at zd~18 deg. With "standard RFs", aside from the (smooth) physical dependence with zenith, we have jumps which result from the non-smoothness of the evolution of the number of training events with pointing, along declination lines. The jump above (in the blue histogram) is located at the mid-point between two training nodes. These artifacts can be removed with the changes proposed here. In all likelihood they are partly responsible for the few-percent systematic errors in flux estimation that we have. |
@vuillaut The training with the Crab line took nearly 10 hours in cp03. Is that normal, or perhaps the use of weights makes it slower? |
Hi |
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.
Looks good. I just left some comments that could be added and some other formatting stuff for docstrings (although we are not keeping consistency across the code, it would be good to enforce it for proper docs rendering)
Co-authored-by: Daniel Morcuende <dmorcuende@iaa.es>
Co-authored-by: Daniel Morcuende <dmorcuende@iaa.es>
Co-authored-by: Daniel Morcuende <dmorcuende@iaa.es>
Co-authored-by: Daniel Morcuende <dmorcuende@iaa.es>
Improved comments
I can't find the allegedly non-addressed suggestion. And there is another approval.
This is to avoid jumps in RF performance in the "mid-points" between training pointing nodes, just because the event statistics occasionally have jumps between neighboring nodes.
The idea is to use "sample_weight", i.e. a weight for each event in the training set, calculated such that each of the pointing nodes has the same total weight.
The calculation is done with all events that are passed to the RFs. Of course, the energy (and impact) range of those events between culmination and high zenith change a lot, so "same number of events" does not mean much when comparing such extremes, but the point here is to avoid steps between neighboring bins (and for those, indeed, the numbers of events are comparable quantities). Only if the impact and energy ranges were poorly chosen (and distributions truncated) would this normalization result in performance jumps like the ones we have without it.