From 30215ef0b01536590be3e13f3e9981e1b3eb47e9 Mon Sep 17 00:00:00 2001 From: Ramona Date: Thu, 15 Nov 2018 15:24:53 +0100 Subject: [PATCH] small differences --- code/analysis_rs.py | 2 +- code/utility.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/analysis_rs.py b/code/analysis_rs.py index 356d461..106fb28 100644 --- a/code/analysis_rs.py +++ b/code/analysis_rs.py @@ -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 diff --git a/code/utility.py b/code/utility.py index 86f2407..0c1ce34 100644 --- a/code/utility.py +++ b/code/utility.py @@ -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