From dd3de6f0fc30b94d386a0d60eb51e2f0c444c021 Mon Sep 17 00:00:00 2001
From: tiborauer <tibor.auer@gmail.com>
Date: Thu, 5 Nov 2020 21:06:54 +0000
Subject: [PATCH] UPDATE: add stimulation to the tsv

---
 rMtS.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rMtS.py b/rMtS.py
index d828add..282dd39 100644
--- a/rMtS.py
+++ b/rMtS.py
@@ -486,7 +486,10 @@ if __name__ == '__main__':
     itemToWrite = [None]*5 # 5 columns
     button = []
     for item in log:
-        if len(item) < 2 or item[1].find('EXP') == -1: continue
+        if len(item) < 2 or (item[1].find('EXP') == -1 and item[2].find('Stimulation') == -1): continue
+        if item[2].find('Stimulation') >= 0:
+            ev.writerow([round(float(item[0]),4), 30, 'Stimulation_'+expInfo['stimulation intensity [mA]'], None, int(item[2].split(' - ')[2].split(': ')[1])])
+            continue
         if any(item[2].find(evs) >= 0 for evs in ['Sample', 'Match', 'Response']):
             if itemToWrite[0] is None:
                 itemToWrite[0:3] = [round(float(item[0]),4), None, item[2].split(' - ')[0]]
-- 
GitLab