small differences
This commit is contained in:
parent
4bff151b3a
commit
30215ef0b0
@ -42,7 +42,7 @@ cv = sigma/mu
|
|||||||
# plot psth into the same plot
|
# plot psth into the same plot
|
||||||
# calculate vector strength
|
# calculate vector strength
|
||||||
|
|
||||||
threshold = 0;
|
threshold = 0
|
||||||
shift_eod = np.roll(eod, 1)
|
shift_eod = np.roll(eod, 1)
|
||||||
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
|
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
|
||||||
sampling_rate = 40000.0
|
sampling_rate = 40000.0
|
||||||
|
@ -2,7 +2,7 @@ import numpy as np
|
|||||||
|
|
||||||
|
|
||||||
def zero_crossing(eod,time):
|
def zero_crossing(eod,time):
|
||||||
threshold = 0;
|
threshold = 0
|
||||||
shift_eod = np.roll(eod, 1)
|
shift_eod = np.roll(eod, 1)
|
||||||
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
|
eod_times = time[(eod >= threshold) & (shift_eod < threshold)]
|
||||||
sampling_rate = 40000.0
|
sampling_rate = 40000.0
|
||||||
@ -10,9 +10,9 @@ def zero_crossing(eod,time):
|
|||||||
return eod_idx
|
return eod_idx
|
||||||
|
|
||||||
|
|
||||||
def vector_strength(spike_times, eod_durations)
|
def vector_strength(spike_times, eod_durations):
|
||||||
alphas = spike_times/ eod_durations
|
alphas = spike_times/ eod_durations
|
||||||
cs = (1/len(spike_times))*np.sum(np.cos(alphas))^2
|
cs = (1/len(spike_times))*np.sum(np.cos(alphas))^2
|
||||||
sn = (1/len(spike_times))*np.sum(np.sin(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
|
return vs
|
||||||
|
Loading…
Reference in New Issue
Block a user