diff --git a/amstrax/plugins/peaks/peak_basics.py b/amstrax/plugins/peaks/peak_basics.py index 392ce734..f7755296 100644 --- a/amstrax/plugins/peaks/peak_basics.py +++ b/amstrax/plugins/peaks/peak_basics.py @@ -185,15 +185,15 @@ def compute(self, peaks): center_position = (r['center_time'] - p['time']) / (p['dt'] * p['length']) is_s1 = p['area'] >= self.config['s1_min_area'] - is_s1 &= range_50p_area > self.config['s1_min_width'] - is_s1 &= range_50p_area < self.config['s1_max_width'] + is_s1 &= r['range_50p_area'] > self.config['s1_min_width'] + is_s1 &= r['range_50p_area'] < self.config['s1_max_width'] is_s1 &= center_position > self.config['s1_min_center_position'] is_s1 &= center_position < self.config['s1_max_center_position'] is_s1 &= r['area_fraction_top'] <= self.config['s1_max_area_fraction_top'] is_s1 &= r['n_channels'] >= self.config['s1_min_channels'] is_s2 = p['area'] > self.config['s2_min_area'] - is_s2 &= range_50p_area > self.config['s2_min_width'] + is_s2 &= r['range_50p_area'] > self.config['s2_min_width'] is_s2 &= r['area_fraction_top'] >= self.config['s2_min_area_fraction_top'] is_s2 &= r['n_channels'] >= self.config['s2_min_channels'] diff --git a/amstrax/plugins/peaks/peak_positions.py b/amstrax/plugins/peaks/peak_positions.py index c9ba1c98..eb17cb9b 100644 --- a/amstrax/plugins/peaks/peak_positions.py +++ b/amstrax/plugins/peaks/peak_positions.py @@ -51,6 +51,6 @@ def compute(self, peaks): result['x_cgr'] = f_12 result['y_cgr'] = f_13 - result['r_cgr'] = np.sqrt(result['x']**2+result['y']**2) + result['r_cgr'] = np.sqrt(result['x_cgr']**2+result['y_cgr']**2) return result