Browse Source

Change the pattern filtering logic #366 (#422)

pull/1/head
Alexandr Velikiy 6 years ago committed by rozetko
parent
commit
13305336b7
  1. 2
      analytics/analytics/models/peak_model.py

2
analytics/analytics/models/peak_model.py

@ -102,7 +102,7 @@ class PeakModel(Model):
convol_data = utils.nan_to_zero(convol_data, nan_list) convol_data = utils.nan_to_zero(convol_data, nan_list)
pattern_data = utils.nan_to_zero(pattern_data, nan_list) pattern_data = utils.nan_to_zero(pattern_data, nan_list)
conv = scipy.signal.fftconvolve(convol_data, pattern_data) conv = scipy.signal.fftconvolve(convol_data, pattern_data)
if max(conv) > self.state['convolve_max'] * 1.05 or max(conv) < self.state['convolve_min'] * 0.95: if max(conv) > self.state['convolve_max'] * 1.2 or max(conv) < self.state['convolve_min'] * 0.9:
delete_list.append(segment) delete_list.append(segment)
elif max(conv) < self.state['conv_del_max'] * 1.02 and max(conv) > self.state['conv_del_min'] * 0.98: elif max(conv) < self.state['conv_del_max'] * 1.02 and max(conv) > self.state['conv_del_min'] * 0.98:
delete_list.append(segment) delete_list.append(segment)

Loading…
Cancel
Save