diff --git a/code/useful_functions.py b/code/useful_functions.py index c259f2c..6988861 100644 --- a/code/useful_functions.py +++ b/code/useful_functions.py @@ -275,7 +275,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): @@ -428,7 +428,11 @@ def spike_times(stim): return spikes, stim_dur, dt # se changed spike_times to spikes so its not the same as name of function +<<<<<<< HEAD def valid_integrals(integral, local_mean, point, threshold = 0.1): +======= +def valid_integrals(integral, local_mean, point, threshold = 0.3): +>>>>>>> 3575361af10b14a99959f8aeb1b57a1e08d0446a """ Check if the integral exceeds the threshold compared to the local mean and provide feedback on whether the given point is valid or not.