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: