# if the average of the value grows toward the peak value, either the signal is nearly constant (empty noise) or the signal fluctuates a lot and has a high average (amplification noise)
keep = False
if keep:
list_events.append(e)
print("basic_noise_filter kept {} events out of {} (-> {}% kept.)".format(len(list_events), len(events), int(100 * len(list_events) / len(events))))