small differences

This commit is contained in:
Ramona 2018-11-15 15:24:53 +01:00
parent 4bff151b3a
commit 30215ef0b0
2 changed files with 4 additions and 4 deletions

View File

@ -42,7 +42,7 @@ cv = sigma/mu
# plot psth into the same plot
# calculate vector strength
threshold = 0;
threshold = 0
shift_eod = np.roll(eod, 1)
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
sampling_rate = 40000.0

View File

@ -2,7 +2,7 @@ import numpy as np
def zero_crossing(eod,time):
threshold = 0;
threshold = 0
shift_eod = np.roll(eod, 1)
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
sampling_rate = 40000.0
@ -10,9 +10,9 @@ def zero_crossing(eod,time):
return eod_idx
def vector_strength(spike_times, eod_durations)
def vector_strength(spike_times, eod_durations):
alphas = spike_times/ eod_durations
cs = (1/len(spike_times))*np.sum(np.cos(alphas))^2
sn = (1/len(spike_times))*np.sum(np.sin(alphas))^2
vs = np.sprt(cs+sn)
vs = np.sqrt(cs+sn)
return vs