Skip to content

Commit

Permalink
Added lone hit area to area per channel (#649)
Browse files Browse the repository at this point in the history
* Added lone hit area to area per channel

* Fix little typo

Co-authored-by: Joran R. Angevaare <jorana@nikhef.nl>
  • Loading branch information
WenzDaniel and JoranAngevaare committed Mar 9, 2022
1 parent c99957e commit 908f95e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion strax/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ def __init__(self):
self.compute_takes_start_end = True
del compute_pars[compute_pars.index('start')]
del compute_pars[compute_pars.index('end')]
self.compute_pars
self.compute_pars = compute_pars

_name = strax.camel_to_snake(self.__class__.__name__)
if not hasattr(self, 'provides'):
Expand Down
1 change: 1 addition & 0 deletions strax/processing/peak_merging.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def add_lone_hits(peaks, lone_hits, to_pe):
p = peaks[fc_i]
lh_area = lh_i['area'] * to_pe[lh_i['channel']]
p['area'] += lh_area
p['area_per_channel'][lh_i['channel']] += lh_area

# Add lone hit as delta pulse to waveform:
index = (p['time'] - lh_i['time'])//p['dt']
Expand Down

0 comments on commit 908f95e

Please sign in to comment.