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

Remove hard-coded arguments in the energy-dependent cuts functions #965

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

chaimain
Copy link
Contributor

Makes the following new traits -

  • min_event_p_en_bin: minimum number of events to check, in each energy bin. I have changed the default value to 100, instead of the earlier 10, which was too low to be meaningful with the standard bins we provide. Needs to be fixed after some more tests.
  • min/max_gh/theta_cut: Minimum and maximum cut values of gh_score (gammaness) and theta, while evaluating the percentile cuts.
  • fill_theta_cut: Fill value of theta cut, when the number of events is below the minimum value, in each energy bin. For gh_score cut, I use the maximum value of 1, as it is fixed.

Also fixes the issue of #954 here to be more consistent PR, rather than #943. #942 can also follow this new change.

The example configs have been updated accordingly.

This will also help in fixing the error seen in running some tests in #961

@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #965 (53fc305) into master (c8abcb2) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #965      +/-   ##
==========================================
- Coverage   85.43%   85.41%   -0.02%     
==========================================
  Files          78       78              
  Lines        6494     6501       +7     
==========================================
+ Hits         5548     5553       +5     
- Misses        946      948       +2     
Impacted Files Coverage Δ
lstchain/tools/lstchain_create_irf_files.py 93.41% <ø> (ø)
lstchain/io/event_selection.py 100.00% <100.00%> (ø)
lstchain/io/tests/test_eventselection.py 100.00% <100.00%> (ø)
lstchain/reco/r0_to_dl1.py 93.03% <0.00%> (-0.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8abcb2...53fc305. Read the comment docs.

@chaimain chaimain requested a review from maxnoe April 12, 2022 07:49
Copy link
Collaborator

@SeiyaNozaki SeiyaNozaki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@maxnoe maxnoe merged commit 0dd3829 into master Apr 12, 2022
@maxnoe maxnoe deleted the improve_dl3_cuts branch April 12, 2022 13:24
SeiyaNozaki added a commit that referenced this pull request Apr 12, 2022
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.

3 participants