Skip to content

get_intensity_cut behavior #1364

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

get_intensity_cut behavior #1364

wants to merge 1 commit into from

Conversation

moralejo
Copy link
Collaborator

Until now, if finding of the intensity peak failed, a log message was shown telling so, but the returned value was 50 p.e. Besides, another message was shown indicating that 50 p.e. was an adequate cut for the run... So it was confusing.

This was just due to the behaviour of the max function when the second argument is nan. Now, in case the peak is not found, the function returns nan. This should however happen rarely.

Until now, if finding of the intensity peak failed, a log message was shown telling so, but the returned value was 50 p.e. Besides, another message was shown indicating that 50 p.e. was an adequate cut for the run... So it was confusing.
This was just due to the behaviour of the max function when the second argument is nan.
Now in case the peak is not found the function returns nan. It should however happen rarely.
@moralejo moralejo requested a review from rlopezcoto June 16, 2025 13:12
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.65%. Comparing base (46392e4) to head (e1fb22e).

Files with missing lines Patch % Lines
lstchain/reco/utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1364   +/-   ##
=======================================
  Coverage   72.65%   72.65%           
=======================================
  Files         137      137           
  Lines       14559    14559           
=======================================
  Hits        10578    10578           
  Misses       3981     3981           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant