From 43dbc6620fad9dce3ed9e4934c54925636eccade Mon Sep 17 00:00:00 2001 From: mbergmann Date: Wed, 23 Oct 2024 14:08:06 +0200 Subject: [PATCH] reversed Dianas push --- 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 7153e09..3c80a0f 100644 --- a/code/useful_functions.py +++ b/code/useful_functions.py @@ -273,7 +273,7 @@ def power_spectrum(stimulus): # computes firing rates rate = firing_rate(binary, dt = dt) # creates power spectrum - freq, power = welch(binary, fs = 1/dt, nperseg = 2**16, noverlap = 2**15) + freq, power = welch(rate, fs = 1/dt, nperseg = 2**16, noverlap = 2**15) return freq, power def prepare_harmonic(frequency, category, num_harmonics, color): @@ -426,7 +426,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, point, threshold = 0.5): +def valid_integrals(integral, local_mean, point, threshold = 0.3): """ Check if the integral exceeds the threshold compared to the local mean and provide feedback on whether the given point is valid or not.