reversed Dianas push

This commit is contained in:
mbergmann 2024-10-23 14:08:06 +02:00
parent 940a461978
commit 43dbc6620f

View File

@ -273,7 +273,7 @@ def power_spectrum(stimulus):
# computes firing rates # computes firing rates
rate = firing_rate(binary, dt = dt) rate = firing_rate(binary, dt = dt)
# creates power spectrum # 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 return freq, power
def prepare_harmonic(frequency, category, num_harmonics, color): 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 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 Check if the integral exceeds the threshold compared to the local mean and
provide feedback on whether the given point is valid or not. provide feedback on whether the given point is valid or not.