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

Check non-positive lone_hits #1358

Merged
merged 1 commit into from
Apr 7, 2024
Merged

Check non-positive lone_hits #1358

merged 1 commit into from
Apr 7, 2024

Conversation

dachengx
Copy link
Collaborator

@dachengx dachengx commented Apr 6, 2024

What does the code in this PR do / what does it improve?

If lone_hits["right_integration"] - lone_hits["left_integration"] <= 0, later at

lh["length"] = lh["right_integration"] - lh["left_integration"]
, lh["length"] will be non-positive, so that error will shown later at strax.add_lone_hits:
strax.add_lone_hits(merged_s2s, lh, self.to_pe, n_top_channels=n_top_pmts_if_digitize_top)
.

Related to #1357.

Can you briefly describe how it works?

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

  • Update the docstring(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the open issues on github?

@dachengx dachengx requested a review from yuema137 April 6, 2024 23:39
@coveralls
Copy link

Coverage Status

coverage: 91.367% (+0.02%) from 91.346%
when pulling ccee83f on check_lone_hits
into 33992c2 on master.

@dachengx dachengx marked this pull request as ready for review April 7, 2024 00:21
@dachengx dachengx merged commit 915183e into master Apr 7, 2024
8 checks passed
@dachengx dachengx deleted the check_lone_hits branch April 7, 2024 00:21
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.

None yet

2 participants