Commit 74a5ad07 authored by Remy Moll's avatar Remy Moll
Browse files

fine tuning of channel acceptance

parent 3c220ee9
...@@ -53,7 +53,7 @@ class Channel: ...@@ -53,7 +53,7 @@ class Channel:
if len(self.peaks) == 0: if len(self.peaks) == 0:
return False return False
if len(self.peaks) > 20: if len(self.peaks) > 5:
return False return False
return True return True
...@@ -74,7 +74,8 @@ class Event: ...@@ -74,7 +74,8 @@ class Event:
@property @property
def is_usable(self): def is_usable(self):
good = sum([ch.is_usable for ch in self.channels]) good = sum([ch.is_usable for ch in self.channels])
return good >= self.min_good_channels ends_good = self.channels[0].is_usable and self.channels[-1].is_usable
return (good >= self.min_good_channels) and ends_good
def recreate_muon_path(self, drift_velocity): def recreate_muon_path(self, drift_velocity):
...@@ -115,4 +116,5 @@ class Measurement: ...@@ -115,4 +116,5 @@ class Measurement:
else: else:
timings[j,i] = -1 timings[j,i] = -1
return timings return timings
\ No newline at end of file
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment