From 739507722d9aa813f274e651b2051b199269de37 Mon Sep 17 00:00:00 2001 From: Diana Date: Wed, 23 Oct 2024 10:51:38 +0200 Subject: [PATCH] changed valid_integrals --- code/useful_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/useful_functions.py b/code/useful_functions.py index 354b04b..cd83e83 100644 --- a/code/useful_functions.py +++ b/code/useful_functions.py @@ -356,7 +356,7 @@ def spike_times(stim): return spikes, stim_dur, dt # se changed spike_times to spikes so its not the same as name of function -def valid_integrals(integral, local_mean, threshold, point): +def valid_integrals(integral, local_mean, point, threshold = 0.5): """ Check if the integral exceeds the threshold compared to the local mean and provide feedback on whether the given point is valid or not. @@ -379,7 +379,7 @@ def valid_integrals(integral, local_mean, threshold, point): message : str A message stating whether the point is valid or not. """ - valid = integral > (local_mean * threshold) + valid = integral > (local_mean * (1 + threshold)) if valid: message = f"The point {point} is valid, as its integral exceeds the threshold." else: