XENONnT / straxen

Streaming analysis for XENON
BSD 3-Clause "New" or "Revised" License
19 stars 33 forks source link

Check non-positive lone_hits #1358

Closed dachengx closed 3 months ago

dachengx commented 3 months ago

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

If lone_hits["right_integration"] - lone_hits["left_integration"] <= 0, later at https://github.com/XENONnT/straxen/blob/33992c2c8d0de8a7b1cc13a97f42b79f26c05f86/straxen/plugins/merged_s2s/merged_s2s.py#L140, lh["length"] will be non-positive, so that error will shown later at strax.add_lone_hits: https://github.com/XENONnT/straxen/blob/33992c2c8d0de8a7b1cc13a97f42b79f26c05f86/straxen/plugins/merged_s2s/merged_s2s.py#L145.

Related to https://github.com/XENONnT/straxen/issues/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:

coveralls commented 3 months ago

Coverage Status

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