From b85a5514c937fc95764b4effab1ded356a71caee Mon Sep 17 00:00:00 2001
From: "remi.clement" <remi.clement@irstea.fr>
Date: Sat, 20 Mar 2021 17:11:31 +0100
Subject: [PATCH] Measurement injection correction

---
 ABMN.txt         |  35 ++++-
 Ohmpi.py         |  56 +++++--
 measurement.csv  | 396 +++++++++++++++++++++++++++++++++++++++++++++++
 ohmpi_param.json |   4 +-
 test.py          |  40 +++++
 5 files changed, 513 insertions(+), 18 deletions(-)
 create mode 100644 test.py

diff --git a/ABMN.txt b/ABMN.txt
index 8aa271ad..6f2126c8 100644
--- a/ABMN.txt
+++ b/ABMN.txt
@@ -1 +1,34 @@
-1 4 2 3
+1 2 3 4
+2 3 4 5
+3 4 5 6
+4 5 6 7
+5 6 7 8
+6 7 8 9
+7 8 9 10
+8 9 10 11
+9 10 11 12
+10 11 12 13
+11 12 13 14
+12 13 14 15
+13 14 15 16
+14 15 16 17
+15 16 17 18
+16 17 18 19
+17 18 19 20
+18 19 20 21
+19 20 21 22
+20 21 22 23
+21 22 23 24
+22 23 24 25
+23 24 25 26
+24 25 26 27
+25 26 27 28
+26 27 28 29
+27 28 29 30
+28 29 30 31
+29 30 31 32
+30 31 32 33
+31 32 33 34
+32 33 34 35
+33 34 35 36
+34 35 36 37
diff --git a/Ohmpi.py b/Ohmpi.py
index 3c7a2ffa..3971cd22 100644
--- a/Ohmpi.py
+++ b/Ohmpi.py
@@ -39,8 +39,6 @@ offset_p3= 0
 integer=10
 meas=numpy.zeros((3,integer))
 
-
-
 """
 import parameters
 """
@@ -74,7 +72,30 @@ Elec_N= adafruit_tca9548a.TCA9548A(i2c, 0X70)
 functions
 """
 # function swtich_mux select the right channels for the multiplexer cascade for electrodes A, B, M and N.
-def switch_mux(quadripole):
+def switch_mux_on(quadripole):
+    elec_adress=[0x76,0X71,0x74,0x70]
+      
+    for i in range(0,4):
+        tca= adafruit_tca9548a.TCA9548A(i2c, elec_adress[i]) #choose MUX A B M or N
+        
+        if quadripole[i] < 17:
+            nb_i2C=7
+            a=quadripole[i]
+        elif quadripole[i] > 16 and quadripole[i] < 33:    
+            nb_i2C=6
+            a=quadripole[i]-16
+        elif quadripole[i] > 32 and quadripole[i] < 49:    
+            nb_i2C=5
+            a=quadripole[i]-32
+        elif quadripole[i] > 48 and quadripole[i] < 65:    
+            nb_i2C=4
+            a=quadripole[i]-48
+              
+        mcp2 = MCP23017(tca[nb_i2C])     
+        mcp2.get_pin(a-1).direction=digitalio.Direction.OUTPUT
+        mcp2.get_pin(a-1).value=True
+ 
+def switch_mux_off(quadripole):
     elec_adress=[0x76,0X71,0x74,0x70]
       
     for i in range(0,4):
@@ -93,10 +114,10 @@ def switch_mux(quadripole):
             nb_i2C=4
             a=quadripole[i]-48
               
-        mcp = MCP23017(tca[nb_i2C])     
-        mcp.get_pin(a-1).direction=digitalio.Direction.OUTPUT
-        mcp.get_pin(a-1).value=True
-        print(quadripole[i])
+        mcp2 = MCP23017(tca[nb_i2C])     
+        mcp2.get_pin(a-1).direction=digitalio.Direction.OUTPUT
+        mcp2.get_pin(a-1).value=False
+       
 
 #function to switch  off mux
 def ZERO_mux(nb_elec):
@@ -118,9 +139,9 @@ def ZERO_mux(nb_elec):
                 nb_i2C=4
                 a=qd-48
                   
-            mcp = MCP23017(tca[nb_i2C])     
-            mcp.get_pin(a-1).direction=digitalio.Direction.OUTPUT
-            mcp.get_pin(a-1).value= False
+            mcp2 = MCP23017(tca[nb_i2C])     
+            mcp2.get_pin(a-1).direction=digitalio.Direction.OUTPUT
+            mcp2.get_pin(a-1).value= False
 
 # function to find rows with identical values in different columns
 def find_identical_in_line(array_object):
@@ -144,7 +165,7 @@ def find_identical_in_line(array_object):
 def read_quad(filename, nb_elec):
     output = numpy.loadtxt(filename, delimiter=" ",dtype=int) # load quadripole file
     # locate lines where the electrode index exceeds the maximum number of electrodes
-    test_index_elec = numpy.array(numpy.where(output > 32))
+    test_index_elec = numpy.array(numpy.where(output > nb_elec))
     # locate lines where an electrode is referred twice
     test_same_elec = find_identical_in_line(output)
     # if statement with exit cases (rajouter un else if pour le deuxième cas du ticket #2)
@@ -165,14 +186,19 @@ def run_measurement(nb_stack, injection_deltat, R_shunt, coefp2, coefp3, elec_ar
     sum_I=0
     sum_Vmn=0
     sum_Ps=0
+    # injection courant and measure
+    mcp = MCP23008(i2c, address=0x20)
+    pin0 = mcp.get_pin(0)
+    pin0.direction = Direction.OUTPUT
+    pin1 = mcp.get_pin(1)
+    pin1.direction = Direction.OUTPUT
     pin0.value = False
     pin1.value = False
-    # injection courant and measure
-    
     for n in range(0,3+2*nb_stack-1) :        
         # current injection
         
         if (n % 2) == 0:
+            
             pin1.value = True
             pin0.value = False # current injection polarity n°1        
         else:
@@ -256,10 +282,10 @@ for g in range(0,pardict.get("nbr_meas")): # for time-lapse monitoring
         # call the switch_mux function to switch to the right electrodes
 
         
-        switch_mux(N[i,])
+        switch_mux_on(N[i,])
         # run a measurement
         current_measurement = run_measurement(pardict.get("stack"), pardict.get("injection_duration"), R_shunt, coef_p2, coef_p3, N[i,])
-        ZERO_mux(pardict.get("nb_electrodes"))
+        switch_mux_off(N[i,])
         #save data and print in a text file
         append_and_save(pardict.get("export_path"), current_measurement)
 
diff --git a/measurement.csv b/measurement.csv
index 70372492..e5948b19 100644
--- a/measurement.csv
+++ b/measurement.csv
@@ -8558,3 +8558,399 @@
 0,2021-03-20 15:16:07.131857,1,4,2,3,-0.01,1.1,-0.01,-0.48,1,5.02
 0,2021-03-20 15:16:25.517444,1,4,2,3,0.9,1.1,0.82,-0.67,1,5.03
 0,2021-03-20 15:16:43.903435,1,4,2,3,0.06,1.1,0.05,1.14,1,5.01
+0,2021-03-20 15:17:01.718644,1,4,2,3,-1.1,1.1,-1.0,-0.49,1,5.03
+0,2021-03-20 15:17:20.168405,1,4,2,3,0.2,1.1,0.18,-1.61,1,5.03
+0,2021-03-20 15:17:37.623599,1,4,2,3,-0.32,1.1,-0.29,0.55,1,5.02
+0,2021-03-20 15:17:55.438218,1,4,2,3,-0.9,1.09,-0.83,0.22,1,5.03
+0,2021-03-20 15:18:12.513951,1,4,2,3,-1.07,1.1,-0.97,1.09,1,5.0
+0,2021-03-20 15:18:30.761628,1,4,2,3,1.45,1.09,1.33,0.4,1,5.0
+0,2021-03-20 15:18:49.005242,1,4,2,3,0.43,1.1,0.39,-0.57,1,5.01
+0,2021-03-20 15:19:07.274662,1,4,2,3,1.23,1.11,1.11,0.6,1,5.0
+0,2021-03-20 15:19:25.545492,1,4,2,3,1.55,1.09,1.42,1.36,1,5.03
+0,2021-03-20 15:19:44.099569,1,4,2,3,-0.9,1.1,-0.82,-0.46,1,5.02
+0,2021-03-20 15:20:02.412010,1,4,2,3,1.95,1.1,1.77,0.49,1,5.01
+0,2021-03-20 15:20:20.654188,1,4,2,3,1.92,1.1,1.75,0.12,1,5.01
+0,2021-03-20 15:20:38.957525,1,4,2,3,1.13,1.1,1.02,-0.82,1,5.01
+0,2021-03-20 15:20:57.156642,1,4,2,3,-2.61,1.1,-2.37,0.36,1,5.0
+0,2021-03-20 15:21:15.095065,1,4,2,3,-2.03,1.09,-1.85,-1.14,1,4.94
+0,2021-03-20 15:21:33.361089,1,4,2,3,-1.17,1.09,-1.07,-0.89,1,5.01
+0,2021-03-20 15:21:50.260773,1,4,2,3,-0.27,1.1,-0.25,-0.04,1,5.01
+0,2021-03-20 15:22:07.205587,1,4,2,3,-0.13,1.1,-0.12,0.62,1,5.04
+0,2021-03-20 15:22:25.432426,1,4,2,3,0.19,1.1,0.17,1.31,1,5.0
+0,2021-03-20 15:22:43.812987,1,4,2,3,58.49,1.09,53.62,220.92,1,5.01
+0,2021-03-20 15:23:02.085848,1,4,2,3,-0.11,1.09,-0.1,0.34,1,5.01
+0,2021-03-20 15:23:20.370250,1,4,2,3,7.35,1.09,6.72,2.4,1,5.01
+0,2021-03-20 15:23:38.174998,1,4,2,3,-0.19,1.1,-0.17,-0.8,1,5.02
+0,2021-03-20 15:23:56.534895,1,4,2,3,2.2,1.1,2.01,-2.18,1,5.02
+0,2021-03-20 15:24:14.953327,1,4,2,3,0.22,1.1,0.2,-1.98,1,5.03
+0,2021-03-20 15:24:33.239904,1,4,2,3,0.35,1.1,0.32,0.63,1,5.0
+0,2021-03-20 15:24:51.588400,1,4,2,3,4.36,1.1,3.96,2.48,1,5.04
+0,2021-03-20 15:25:09.899592,1,4,2,3,4.88,1.1,4.43,-0.45,1,5.0
+0,2021-03-20 15:25:28.188092,1,4,2,3,0.52,1.1,0.47,-2.63,1,5.03
+0,2021-03-20 15:25:45.662104,1,4,2,3,4.56,1.1,4.14,2.38,1,4.98
+0,2021-03-20 15:26:03.690370,1,4,2,3,0.57,1.09,0.53,2.52,1,5.07
+0,2021-03-20 15:27:18.457931,1,2,3,4,1.69,1.1,1.53,0.98,1,5.0
+0,2021-03-20 15:27:35.962792,1,2,3,4,-0.28,1.1,-0.26,0.66,1,5.0
+0,2021-03-20 15:27:52.854325,1,2,3,4,0.26,1.1,0.24,1.22,1,4.81
+0,2021-03-20 15:28:09.862726,1,2,3,4,-1.75,1.1,-1.59,1.93,1,5.02
+0,2021-03-20 15:28:27.466353,1,2,3,4,-0.84,1.09,-0.77,-4.88,1,5.07
+0,2021-03-20 15:28:45.895222,1,2,3,4,-4.04,1.1,-3.68,0.41,1,5.01
+0,2021-03-20 15:29:04.225155,1,2,3,4,1.38,1.09,1.26,2.04,1,5.01
+0,2021-03-20 15:29:21.172022,1,2,3,4,2.29,1.1,2.08,1.44,1,5.05
+0,2021-03-20 15:29:38.985600,1,2,3,4,4.04,1.1,3.69,0.22,1,5.01
+0,2021-03-20 15:29:57.292495,1,2,3,4,-1.44,1.1,-1.31,0.11,1,5.01
+0,2021-03-20 15:30:15.120498,1,2,3,4,-1.43,1.1,-1.3,0.91,1,5.01
+0,2021-03-20 15:30:33.190154,1,2,3,4,0.97,1.1,0.89,0.95,1,5.01
+0,2021-03-20 15:30:50.669114,1,2,3,4,1.55,1.1,1.41,-0.09,1,4.97
+0,2021-03-20 15:31:09.128928,1,2,3,4,1.54,1.1,1.4,0.97,1,5.01
+0,2021-03-20 15:31:27.438379,1,2,3,4,-0.13,1.1,-0.12,0.15,1,5.03
+0,2021-03-20 15:31:45.621558,1,2,3,4,0.79,1.1,0.71,-1.72,1,4.96
+0,2021-03-20 15:32:01.900655,1,2,3,4,-2.18,1.11,-1.96,-1.17,1,4.9
+0,2021-03-20 15:32:38.909432,1,2,3,4,0.2,1.11,0.18,1.16,1,25.11
+0,2021-03-20 15:33:16.897840,1,2,3,4,2.29,1.1,2.07,-1.21,1,25.14
+0,2021-03-20 15:33:53.588558,1,2,3,4,0.67,1.1,0.6,5.03,1,25.05
+0,2021-03-20 15:34:30.143577,1,2,3,4,-2.06,1.12,-1.85,3.49,1,25.13
+0,2021-03-20 15:35:11.223260,1,2,3,4,0.61,1.1,0.55,0.0,1,25.12
+0,2021-03-20 15:35:49.441874,1,2,3,4,-0.14,1.11,-0.13,1.29,1,24.9
+0,2021-03-20 15:36:25.620680,1,2,3,4,-3.15,1.11,-2.83,3.34,1,25.14
+0,2021-03-20 15:37:02.201789,1,2,3,4,0.15,1.1,0.14,3.27,1,25.06
+0,2021-03-20 15:37:40.107657,1,2,3,4,0.07,1.11,0.06,-1.17,1,24.98
+0,2021-03-20 15:38:44.219879,1,2,3,4,-0.33,1.11,-0.3,0.14,1,25.08
+0,2021-03-20 15:39:22.143630,1,2,3,4,1.91,1.1,1.73,0.08,1,25.11
+0,2021-03-20 15:40:00.556308,1,2,3,4,0.66,1.1,0.59,-0.0,1,25.11
+0,2021-03-20 15:40:39.068239,1,2,3,4,-0.16,1.1,-0.15,-2.86,1,25.13
+0,2021-03-20 15:41:17.320469,1,2,3,4,27.16,1.1,24.6,194.21,1,25.12
+0,2021-03-20 15:41:53.775757,1,2,3,4,0.12,1.11,0.11,-3.61,1,24.96
+0,2021-03-20 15:50:24.571532,1,2,3,4,-1.14,1.11,-1.03,1.79,1,24.99
+0,2021-03-20 15:51:17.972856,1,2,3,4,-1.11,1.11,-1.01,-2.89,1,25.11
+0,2021-03-20 15:54:29.766710,1,2,3,4,0.57,1.11,0.52,-0.9,1,25.13
+0,2021-03-20 15:55:10.332278,1,2,3,4,-36.48,1.11,-32.79,-34.44,1,25.17
+0,2021-03-20 15:56:03.981818,1,2,3,4,-1.08,4.41,-0.24,0.91,1,25.14
+0,2021-03-20 15:57:12.973693,1,2,3,4,965.74,4.41,219.21,-1.39,1,25.12
+0,2021-03-20 15:59:40.467656,1,2,3,4,966.22,4.41,219.0,-0.52,1,25.14
+0,2021-03-20 16:00:27.709348,1,2,3,4,966.38,4.42,218.86,-0.54,1,4.93
+0,2021-03-20 16:00:45.514625,1,2,3,4,966.02,4.42,218.31,-0.53,1,4.96
+0,2021-03-20 16:01:03.861444,1,2,3,4,965.8,4.42,218.57,-0.84,1,4.94
+0,2021-03-20 16:01:20.766192,1,2,3,4,966.37,4.42,218.8,-0.29,1,4.89
+0,2021-03-20 16:01:36.558632,1,2,3,4,966.17,4.43,218.24,-0.59,1,4.9
+0,2021-03-20 16:01:52.451335,1,2,3,4,965.64,4.41,219.01,-0.27,1,5.02
+0,2021-03-20 16:02:09.092925,1,2,3,4,966.96,4.43,218.2,-0.48,1,5.0
+0,2021-03-20 16:02:24.626279,1,2,3,4,966.11,4.42,218.54,-0.25,1,5.12
+0,2021-03-20 16:02:43.033757,1,2,3,4,965.7,4.43,218.16,-1.41,1,5.09
+0,2021-03-20 16:03:01.022539,1,2,3,4,966.18,4.42,218.51,-0.48,1,5.1
+0,2021-03-20 16:03:19.555664,1,2,3,4,966.01,4.42,218.67,-1.17,1,5.09
+0,2021-03-20 16:03:37.943045,1,2,3,4,965.91,4.43,217.95,-0.84,1,5.08
+0,2021-03-20 16:03:56.323901,1,2,3,4,966.79,4.42,218.65,-0.71,1,5.08
+0,2021-03-20 16:04:14.207612,1,2,3,4,966.49,4.43,218.34,-0.32,1,5.1
+0,2021-03-20 16:04:32.628754,1,2,3,4,966.06,4.42,218.37,-0.67,1,5.09
+0,2021-03-20 16:04:51.115614,1,2,3,4,965.72,4.43,218.09,-0.73,1,5.1
+0,2021-03-20 16:05:09.439326,1,2,3,4,966.44,4.43,218.34,-0.29,1,5.08
+0,2021-03-20 16:05:27.848765,1,2,3,4,966.28,4.42,218.49,-1.11,1,5.09
+0,2021-03-20 16:05:46.295458,1,2,3,4,965.8,4.42,218.5,-0.7,1,5.09
+0,2021-03-20 16:06:04.885518,1,2,3,4,966.25,4.43,218.34,-0.83,1,5.29
+0,2021-03-20 16:06:23.302220,1,2,3,4,965.9,4.42,218.29,-1.0,1,5.08
+0,2021-03-20 16:06:41.664810,1,2,3,4,967.12,4.43,218.11,-1.98,1,5.07
+0,2021-03-20 16:07:00.041323,1,2,3,4,965.95,4.43,218.03,-0.53,1,5.09
+0,2021-03-20 16:07:17.962221,1,2,3,4,966.8,4.43,218.43,-0.54,1,5.09
+0,2021-03-20 16:07:36.276773,1,2,3,4,965.81,4.44,217.74,-0.67,1,5.03
+0,2021-03-20 16:07:54.595322,1,2,3,4,966.76,4.43,218.34,-0.56,1,5.08
+0,2021-03-20 16:08:12.903484,1,2,3,4,965.92,4.43,218.09,-1.54,1,5.08
+0,2021-03-20 16:08:31.202223,1,2,3,4,967.25,4.42,218.61,0.63,1,5.08
+0,2021-03-20 16:08:48.545313,1,2,3,4,966.28,4.43,218.24,-0.79,1,5.08
+0,2021-03-20 16:09:06.847706,1,2,3,4,966.25,4.43,218.11,-0.93,1,5.08
+0,2021-03-20 16:09:25.152168,1,2,3,4,965.82,4.43,217.99,-0.61,1,5.08
+0,2021-03-20 16:09:43.465605,1,2,3,4,967.08,4.43,218.53,-1.08,1,5.08
+0,2021-03-20 16:10:01.379717,1,2,3,4,966.57,4.43,218.18,-1.1,1,5.1
+0,2021-03-20 16:10:19.801386,1,2,3,4,965.67,4.42,218.33,-0.46,1,5.08
+0,2021-03-20 16:10:37.724510,1,2,3,4,966.99,4.42,218.55,-1.13,1,5.09
+0,2021-03-20 16:10:56.072476,1,2,3,4,966.79,4.43,218.16,-0.95,1,5.08
+0,2021-03-20 16:11:14.431607,1,2,3,4,966.6,4.41,219.07,-0.29,1,5.09
+0,2021-03-20 16:11:31.871199,1,2,3,4,966.15,4.44,217.84,-0.77,1,5.08
+0,2021-03-20 16:11:49.808816,1,2,3,4,966.31,4.43,218.08,-0.14,1,5.09
+0,2021-03-20 16:12:08.120638,1,2,3,4,965.65,4.43,218.12,-0.3,1,5.08
+0,2021-03-20 16:12:26.430728,1,2,3,4,966.1,4.42,218.41,-0.61,1,5.08
+0,2021-03-20 16:12:44.742564,1,2,3,4,966.42,4.43,218.39,-0.76,1,5.08
+0,2021-03-20 16:13:02.666281,1,2,3,4,965.74,4.42,218.39,-0.18,1,5.09
+0,2021-03-20 16:13:21.042463,1,2,3,4,966.64,4.42,218.76,-0.82,1,5.08
+0,2021-03-20 16:13:39.385524,1,2,3,4,966.66,4.41,219.01,-1.69,1,5.08
+0,2021-03-20 16:13:57.745637,1,2,3,4,966.12,4.43,218.21,-0.61,1,5.09
+0,2021-03-20 16:14:16.075684,1,2,3,4,965.92,4.42,218.33,-0.83,1,5.08
+0,2021-03-20 16:14:34.374791,1,2,3,4,965.82,4.42,218.28,-0.87,1,5.08
+0,2021-03-20 16:14:52.659048,1,2,3,4,966.26,4.42,218.48,-0.4,1,5.08
+0,2021-03-20 16:15:10.955403,1,2,3,4,966.71,4.42,218.76,-0.05,1,5.08
+0,2021-03-20 16:15:28.847743,1,2,3,4,966.69,4.42,218.76,-0.87,1,5.08
+0,2021-03-20 16:15:47.183727,1,2,3,4,966.05,4.43,218.23,-1.24,1,5.08
+0,2021-03-20 16:16:05.082255,1,2,3,4,965.95,4.43,218.07,-2.12,1,5.11
+0,2021-03-20 16:16:23.439425,1,2,3,4,966.46,4.42,218.54,-0.48,1,5.08
+0,2021-03-20 16:16:40.840118,1,2,3,4,966.42,4.42,218.47,-1.63,1,5.09
+0,2021-03-20 16:16:59.289462,1,2,3,4,966.22,4.43,217.89,-0.52,1,5.1
+0,2021-03-20 16:17:16.773753,1,2,3,4,966.4,4.43,218.08,-1.24,1,5.08
+0,2021-03-20 16:17:34.204749,1,2,3,4,966.37,4.42,218.58,-0.27,1,5.12
+0,2021-03-20 16:17:52.557799,1,2,3,4,966.3,4.43,218.21,-0.88,1,5.09
+0,2021-03-20 16:18:10.666803,1,2,3,4,965.56,4.43,218.17,-0.61,1,5.11
+0,2021-03-20 16:18:28.566726,1,2,3,4,966.5,4.43,218.02,-0.8,1,5.04
+0,2021-03-20 16:18:47.010753,1,2,3,4,966.26,4.43,217.99,-0.98,1,5.08
+0,2021-03-20 16:19:05.408944,1,2,3,4,966.57,4.42,218.51,-0.8,1,5.09
+0,2021-03-20 16:19:23.739463,1,2,3,4,966.45,4.42,218.59,-0.54,1,5.08
+0,2021-03-20 16:19:41.148422,1,2,3,4,965.31,4.41,219.03,-0.06,1,5.09
+0,2021-03-20 16:19:59.494035,1,2,3,4,965.97,4.43,218.14,-0.5,1,5.08
+0,2021-03-20 16:20:17.841703,1,2,3,4,965.85,4.43,218.14,-0.67,1,5.09
+0,2021-03-20 16:20:36.223911,1,2,3,4,965.8,4.43,218.17,-0.47,1,5.11
+0,2021-03-20 16:20:54.677780,1,2,3,4,966.49,4.43,218.38,-1.51,1,5.08
+0,2021-03-20 16:21:12.984409,1,2,3,4,966.1,4.42,218.43,-0.26,1,5.08
+0,2021-03-20 16:21:31.289225,1,2,3,4,966.32,4.42,218.55,-0.86,1,5.08
+0,2021-03-20 16:21:48.626995,1,2,3,4,966.46,4.43,218.34,-0.15,1,5.08
+0,2021-03-20 16:22:06.606689,1,2,3,4,966.58,4.42,218.56,-0.69,1,5.09
+0,2021-03-20 16:22:24.962554,1,2,3,4,966.19,4.42,218.51,-0.94,1,5.09
+0,2021-03-20 16:22:42.466676,1,2,3,4,966.84,4.43,218.43,-0.83,1,5.09
+0,2021-03-20 16:23:00.782813,1,2,3,4,965.7,4.42,218.4,-0.4,1,5.08
+0,2021-03-20 16:23:18.711540,1,2,3,4,967.89,4.43,218.54,-0.83,1,5.09
+0,2021-03-20 16:23:37.074959,1,2,3,4,965.89,4.43,218.14,-0.63,1,5.1
+0,2021-03-20 16:23:55.546529,1,2,3,4,966.03,4.43,217.94,-0.4,1,5.1
+0,2021-03-20 16:24:13.921106,1,2,3,4,966.8,4.43,218.3,-0.89,1,5.08
+0,2021-03-20 16:24:31.757681,1,2,3,4,965.85,4.43,218.05,-0.43,1,5.08
+0,2021-03-20 16:24:50.161103,1,2,3,4,966.04,4.43,218.29,-0.46,1,5.1
+0,2021-03-20 16:25:08.519494,1,2,3,4,966.19,4.42,218.79,-0.63,1,5.08
+0,2021-03-20 16:25:26.359080,1,2,3,4,966.7,4.43,218.32,-1.21,1,5.06
+0,2021-03-20 16:25:44.668239,1,2,3,4,966.09,4.44,217.5,-0.57,1,5.1
+0,2021-03-20 16:26:03.121666,1,2,3,4,966.66,4.43,218.17,-0.52,1,5.08
+0,2021-03-20 16:26:21.473749,1,2,3,4,967.01,4.43,218.32,0.54,1,5.12
+0,2021-03-20 16:26:39.693317,1,2,3,4,966.46,4.43,218.18,-0.34,1,5.08
+0,2021-03-20 16:26:57.830960,1,2,3,4,966.16,4.43,217.98,-0.18,1,4.91
+0,2021-03-20 16:27:16.142432,1,2,3,4,966.63,4.43,218.43,-0.53,1,5.08
+0,2021-03-20 16:27:34.003659,1,2,3,4,966.55,4.43,218.01,-0.4,1,5.09
+0,2021-03-20 16:27:52.272621,1,2,3,4,966.96,4.43,218.25,-0.9,1,5.03
+0,2021-03-20 16:28:10.200146,1,2,3,4,965.96,4.42,218.33,-0.8,1,5.1
+0,2021-03-20 16:28:27.601376,1,2,3,4,965.87,4.42,218.47,-0.56,1,5.03
+0,2021-03-20 16:28:46.080482,1,2,3,4,967.48,4.42,218.98,-1.2,1,5.09
+0,2021-03-20 16:29:04.043286,1,2,3,4,965.85,4.42,218.72,-0.76,1,5.09
+0,2021-03-20 16:29:22.419096,1,2,3,4,966.29,4.42,218.55,-1.85,1,5.08
+0,2021-03-20 16:29:40.771590,1,2,3,4,965.67,4.43,218.04,-0.01,1,5.09
+0,2021-03-20 16:29:59.168499,1,2,3,4,965.4,4.43,217.87,-0.16,1,5.13
+0,2021-03-20 16:30:17.537774,1,2,3,4,966.8,4.43,218.04,-1.13,1,5.1
+0,2021-03-20 16:30:35.880407,1,2,3,4,966.51,4.44,217.73,-0.22,1,5.08
+0,2021-03-20 16:30:54.224281,1,2,3,4,966.02,4.43,218.28,-1.86,1,5.09
+0,2021-03-20 16:31:12.128060,1,2,3,4,966.25,4.43,218.34,-0.6,1,5.1
+0,2021-03-20 16:31:30.111817,1,2,3,4,964.49,4.43,217.66,-0.39,1,5.09
+0,2021-03-20 16:31:48.472886,1,2,3,4,966.31,4.44,217.64,-0.35,1,5.11
+0,2021-03-20 16:32:05.947954,1,2,3,4,966.36,4.43,218.35,-0.4,1,5.12
+0,2021-03-20 16:32:24.287560,1,2,3,4,966.66,4.43,218.37,-0.91,1,5.08
+0,2021-03-20 16:32:41.672894,1,2,3,4,965.87,4.43,218.05,-0.05,1,5.01
+0,2021-03-20 16:32:59.964225,1,2,3,4,966.08,4.42,218.71,-0.59,1,5.08
+0,2021-03-20 16:33:17.388742,1,2,3,4,967.27,4.43,218.42,-1.27,1,5.08
+0,2021-03-20 16:33:34.722956,1,2,3,4,966.38,4.42,218.5,-1.43,1,5.06
+0,2021-03-20 16:33:53.062576,1,2,3,4,965.8,4.42,218.27,-0.82,1,5.08
+0,2021-03-20 16:34:11.018954,1,2,3,4,966.37,4.42,218.85,-0.95,1,5.09
+0,2021-03-20 16:34:28.934466,1,2,3,4,966.04,4.42,218.6,0.15,1,5.1
+0,2021-03-20 16:34:47.251295,1,2,3,4,965.96,4.42,218.59,-0.33,1,5.08
+0,2021-03-20 16:35:05.640187,1,2,3,4,966.23,4.41,218.85,-0.36,1,5.1
+0,2021-03-20 16:35:24.039754,1,2,3,4,965.99,4.43,218.22,-0.67,1,5.09
+0,2021-03-20 16:35:41.545433,1,2,3,4,966.4,4.42,218.77,-0.12,1,5.1
+0,2021-03-20 16:35:59.998306,1,2,3,4,966.24,4.42,218.57,-0.33,1,5.1
+0,2021-03-20 16:36:17.973672,1,2,3,4,966.52,4.43,218.11,-0.28,1,5.09
+0,2021-03-20 16:36:36.405445,1,2,3,4,966.99,4.42,218.94,-0.77,1,5.1
+0,2021-03-20 16:36:54.730172,1,2,3,4,966.63,4.42,218.85,-0.74,1,5.09
+0,2021-03-20 16:37:13.145979,1,2,3,4,966.62,4.42,218.66,-0.21,1,5.09
+0,2021-03-20 16:37:31.487876,1,2,3,4,966.84,4.43,218.47,-0.53,1,5.09
+0,2021-03-20 16:37:49.823168,1,2,3,4,966.03,4.42,218.59,-0.33,1,5.08
+0,2021-03-20 16:38:08.178784,1,2,3,4,966.11,4.42,218.38,-0.2,1,5.09
+0,2021-03-20 16:38:26.541939,1,2,3,4,966.21,4.44,217.71,-1.21,1,5.09
+0,2021-03-20 16:38:44.896180,1,2,3,4,965.3,4.43,217.67,0.16,1,5.09
+0,2021-03-20 16:39:03.100370,1,2,3,4,966.29,4.43,218.24,-0.42,1,5.08
+0,2021-03-20 16:39:20.595476,1,2,3,4,966.47,4.42,218.56,-0.16,1,5.09
+0,2021-03-20 16:39:38.915073,1,2,3,4,966.52,4.42,218.76,-0.94,1,5.08
+0,2021-03-20 16:39:56.795581,1,2,3,4,966.06,4.41,218.82,-0.46,1,5.09
+0,2021-03-20 16:40:15.181129,1,2,3,4,966.3,4.42,218.55,-0.25,1,5.1
+0,2021-03-20 16:40:33.557236,1,2,3,4,966.53,4.42,218.88,-0.81,1,5.08
+0,2021-03-20 16:40:51.914573,1,2,3,4,967.33,4.42,218.73,-1.07,1,5.09
+0,2021-03-20 16:41:09.747011,1,2,3,4,965.51,4.42,218.44,-1.1,1,5.08
+0,2021-03-20 16:41:28.101807,1,2,3,4,965.56,4.42,218.22,-0.19,1,5.1
+0,2021-03-20 16:41:46.467602,1,2,3,4,966.02,4.42,218.49,0.01,1,5.08
+0,2021-03-20 16:42:04.444920,1,2,3,4,967.17,4.42,218.72,0.2,1,5.09
+0,2021-03-20 16:42:22.331139,1,2,3,4,966.08,4.42,218.42,-0.07,1,5.1
+0,2021-03-20 16:42:40.533472,1,2,3,4,965.89,4.42,218.58,-0.89,1,5.1
+0,2021-03-20 16:42:58.952070,1,2,3,4,966.29,4.42,218.47,-0.68,1,5.11
+0,2021-03-20 16:43:17.392963,1,2,3,4,966.36,4.43,218.13,-0.16,1,5.09
+0,2021-03-20 16:43:34.899371,1,2,3,4,965.98,4.41,218.89,-0.98,1,5.09
+0,2021-03-20 16:43:52.769386,1,2,3,4,966.51,4.42,218.68,-0.36,1,5.09
+0,2021-03-20 16:44:10.662177,1,2,3,4,2333.17,10.63,219.51,7.09,1,5.09
+0,2021-03-20 16:44:29.141589,1,2,3,4,2341.33,10.68,219.32,-0.34,1,5.11
+0,2021-03-20 16:44:47.414380,1,2,3,4,2341.96,10.68,219.24,-1.02,1,5.09
+0,2021-03-20 16:45:05.280210,1,2,3,4,2685.45,12.24,219.35,-0.5,1,5.09
+0,2021-03-20 16:45:23.665182,1,2,3,4,2686.23,12.25,219.35,-0.42,1,5.09
+0,2021-03-20 16:45:41.132044,1,2,3,4,2685.34,12.24,219.46,-0.98,1,5.09
+0,2021-03-20 16:45:59.475020,1,2,3,4,2685.8,12.23,219.52,-0.67,1,5.01
+0,2021-03-20 16:46:15.482732,1,2,3,4,2685.48,12.24,219.43,0.56,1,4.95
+0,2021-03-20 16:46:32.468377,1,2,3,4,2685.53,12.23,219.67,0.07,1,5.01
+0,2021-03-20 16:46:49.324962,1,2,3,4,2684.84,12.24,219.41,0.01,1,5.01
+0,2021-03-20 16:47:05.418570,1,2,3,4,2685.59,12.23,219.66,-0.25,1,5.08
+0,2021-03-20 16:48:37.821399,1,2,3,4,2685.67,12.24,219.38,-0.63,1,5.09
+0,2021-03-20 16:48:52.276742,1,2,3,4,2685.68,12.24,219.43,-0.53,1,5.09
+0,2021-03-20 16:49:06.329395,1,2,3,4,2685.61,12.24,219.47,-0.41,1,5.09
+0,2021-03-20 16:49:20.552775,1,2,3,4,2685.73,12.23,219.52,-0.6,1,4.95
+0,2021-03-20 16:49:37.926371,1,2,3,4,2685.23,12.24,219.46,-0.29,1,5.01
+0,2021-03-20 16:49:47.791135,1,2,3,4,2685.53,12.23,219.6,-0.7,1,5.09
+0,2021-03-20 16:49:57.594001,1,2,3,4,2685.98,12.24,219.43,-0.39,1,5.05
+0,2021-03-20 16:50:06.581622,1,2,3,4,2685.76,12.24,219.46,-0.56,1,4.92
+0,2021-03-20 16:50:16.462514,1,2,3,4,2686.21,12.23,219.62,0.3,1,5.1
+0,2021-03-20 16:50:26.354668,1,2,3,4,2686.73,12.23,219.77,-0.34,1,5.1
+0,2021-03-20 16:50:35.712926,1,2,3,4,2684.88,12.24,219.27,-0.67,1,4.86
+0,2021-03-20 16:50:49.932858,1,2,3,4,2684.81,12.24,219.37,0.25,1,3.08
+0,2021-03-20 16:50:57.396287,1,2,3,4,2685.63,12.23,219.68,-0.29,1,3.09
+0,2021-03-20 16:51:04.597682,1,2,3,4,2685.14,12.25,219.26,-0.41,1,3.07
+0,2021-03-20 16:51:11.427891,1,2,3,4,2685.94,12.24,219.51,-0.67,1,2.91
+0,2021-03-20 16:51:19.274957,1,2,3,4,2686.37,12.23,219.58,-0.68,1,3.08
+0,2021-03-20 16:51:27.091370,1,2,3,4,2685.08,12.23,219.56,-0.12,1,3.05
+0,2021-03-20 16:51:34.508046,1,2,3,4,2685.71,12.23,219.63,0.16,1,3.08
+0,2021-03-20 16:51:42.335954,1,2,3,4,2685.86,12.23,219.66,-0.19,1,3.08
+0,2021-03-20 16:51:50.183011,1,2,3,4,2685.54,12.22,219.68,-1.56,1,3.08
+0,2021-03-20 16:51:57.240756,1,2,3,4,2685.27,12.23,219.58,-0.75,1,3.03
+0,2021-03-20 16:52:05.133153,1,2,3,4,2685.13,12.22,219.7,0.09,1,3.1
+0,2021-03-20 16:52:13.005852,1,2,3,4,2685.93,12.22,219.73,-0.47,1,3.09
+0,2021-03-20 16:52:20.865974,1,2,3,4,2685.55,12.23,219.64,0.19,1,3.08
+0,2021-03-20 16:52:28.736864,1,2,3,4,2685.55,12.22,219.7,-0.63,1,3.09
+0,2021-03-20 16:52:36.576889,1,2,3,4,2686.09,12.24,219.53,0.16,1,3.08
+0,2021-03-20 16:52:44.460040,1,2,3,4,2686.85,12.23,219.76,-0.32,1,3.12
+0,2021-03-20 16:52:52.313212,1,2,3,4,2685.53,12.23,219.6,-0.26,1,3.08
+0,2021-03-20 16:53:00.240080,1,2,3,4,2686.03,12.22,219.74,-0.5,1,3.09
+0,2021-03-20 16:53:08.268833,1,2,3,4,2685.4,12.23,219.61,-0.06,1,3.24
+0,2021-03-20 16:53:15.674741,1,2,3,4,2685.3,12.23,219.56,-0.93,1,3.09
+0,2021-03-20 16:53:23.562357,1,2,3,4,2686.63,12.23,219.6,0.77,1,3.1
+0,2021-03-20 16:53:31.434274,1,2,3,4,2685.75,12.23,219.52,-0.48,1,3.09
+0,2021-03-20 16:53:39.288392,1,2,3,4,2685.5,12.23,219.63,-0.59,1,3.09
+0,2021-03-20 16:53:47.151078,1,2,3,4,2685.81,12.23,219.64,0.0,1,3.08
+0,2021-03-20 16:53:54.609978,1,2,3,4,2686.45,12.23,219.74,-0.67,1,3.11
+0,2021-03-20 16:54:01.992704,1,2,3,4,2685.81,12.23,219.66,-0.98,1,3.1
+0,2021-03-20 16:54:09.475585,1,2,3,4,2686.66,12.22,219.83,0.39,1,3.09
+0,2021-03-20 16:54:16.907013,1,2,3,4,2685.93,12.23,219.65,-0.21,1,3.1
+0,2021-03-20 16:54:24.829888,1,2,3,4,2685.5,12.22,219.76,-0.4,1,3.09
+0,2021-03-20 16:54:32.208569,1,2,3,4,2686.12,12.22,219.75,-1.32,1,3.08
+0,2021-03-20 16:54:40.059508,1,2,3,4,2685.57,12.23,219.56,-0.8,1,3.06
+0,2021-03-20 16:54:47.927023,1,2,3,4,2684.96,12.23,219.54,-0.94,1,3.08
+0,2021-03-20 16:54:55.789338,1,2,3,4,2685.74,12.23,219.69,-0.19,1,3.09
+0,2021-03-20 16:55:03.647431,1,2,3,4,2685.41,12.23,219.61,-0.56,1,3.09
+0,2021-03-20 16:55:11.085389,1,2,3,4,2686.04,12.23,219.64,-0.89,1,3.08
+0,2021-03-20 16:55:18.981499,1,2,3,4,2685.41,12.22,219.72,-0.09,1,3.12
+0,2021-03-20 16:55:26.844110,1,2,3,4,2686.05,12.22,219.72,-0.9,1,3.09
+0,2021-03-20 16:55:34.695832,1,2,3,4,2684.24,12.23,219.53,-0.21,1,3.09
+0,2021-03-20 16:55:42.564366,1,2,3,4,2685.26,12.22,219.72,-0.74,1,3.09
+0,2021-03-20 16:55:50.448072,1,2,3,4,2684.98,12.23,219.47,-0.01,1,3.08
+0,2021-03-20 16:55:58.342046,1,2,3,4,2686.08,12.23,219.66,-0.46,1,3.07
+0,2021-03-20 16:56:05.713550,1,2,3,4,2685.41,12.22,219.76,0.35,1,3.08
+0,2021-03-20 16:56:12.499378,1,2,3,4,2685.81,12.23,219.68,-0.52,1,2.95
+0,2021-03-20 16:56:20.363582,1,2,3,4,2685.62,12.24,219.47,-0.54,1,3.08
+0,2021-03-20 16:56:27.280135,1,2,3,4,2685.3,12.23,219.61,-0.41,1,3.1
+0,2021-03-20 16:56:35.198858,1,2,3,4,2685.77,12.23,219.65,-0.86,1,3.1
+0,2021-03-20 16:56:43.087347,1,2,3,4,2687.09,12.23,219.79,0.48,1,3.09
+0,2021-03-20 16:56:50.972402,1,2,3,4,2686.02,12.23,219.64,0.23,1,3.09
+0,2021-03-20 16:56:58.835808,1,2,3,4,2685.89,12.23,219.7,-1.3,1,3.08
+0,2021-03-20 16:57:06.712795,1,2,3,4,2686.48,12.23,219.72,-0.36,1,3.08
+0,2021-03-20 16:57:14.602504,1,2,3,4,2686.27,12.22,219.9,-0.25,1,3.09
+0,2021-03-20 16:57:22.470493,1,2,3,4,2685.98,12.23,219.61,-0.76,1,3.09
+0,2021-03-20 16:57:30.028254,1,2,3,4,2685.95,12.24,219.5,-0.14,1,3.02
+0,2021-03-20 16:57:37.866248,1,2,3,4,2686.14,12.23,219.63,-0.23,1,3.08
+0,2021-03-20 16:57:44.725166,1,2,3,4,2687.23,12.23,219.76,-0.64,1,3.08
+0,2021-03-20 16:57:52.559519,1,2,3,4,2686.07,12.22,219.72,-0.54,1,3.08
+0,2021-03-20 16:58:00.393501,1,2,3,4,2685.11,12.23,219.5,-0.8,1,3.08
+0,2021-03-20 16:58:07.992616,1,2,3,4,2686.28,12.24,219.55,-0.66,1,3.0
+0,2021-03-20 16:58:15.914416,1,2,3,4,2686.69,12.24,219.58,-1.37,1,3.09
+0,2021-03-20 16:58:23.323866,1,2,3,4,2685.12,12.23,219.58,-0.88,1,3.08
+0,2021-03-20 16:58:31.173578,1,2,3,4,2686.38,12.23,219.59,-0.5,1,3.07
+0,2021-03-20 16:58:39.080572,1,2,3,4,2685.66,12.22,219.71,-1.0,1,3.1
+0,2021-03-20 16:58:46.469418,1,2,3,4,2686.41,12.23,219.6,-0.01,1,3.09
+0,2021-03-20 16:58:54.368856,1,2,3,4,2686.24,12.22,219.83,-0.86,1,3.09
+0,2021-03-20 16:59:01.784790,1,2,3,4,2685.69,12.23,219.67,-1.01,1,3.09
+0,2021-03-20 16:59:09.609383,1,2,3,4,2685.35,12.23,219.61,-0.81,1,3.03
+0,2021-03-20 16:59:17.464431,1,2,3,4,2685.3,12.22,219.72,0.04,1,3.09
+0,2021-03-20 16:59:25.344041,1,2,3,4,2686.57,12.22,219.79,-0.36,1,3.09
+0,2021-03-20 16:59:33.243007,1,2,3,4,2684.8,12.22,219.68,-0.87,1,3.09
+0,2021-03-20 16:59:41.125392,1,2,3,4,2685.04,12.23,219.61,-0.45,1,3.09
+0,2021-03-20 16:59:49.035356,1,2,3,4,2685.49,12.22,219.77,-0.53,1,3.1
+0,2021-03-20 16:59:56.916762,1,2,3,4,2685.37,12.22,219.77,-0.22,1,3.09
+0,2021-03-20 17:00:04.817434,1,2,3,4,2685.76,12.23,219.55,0.05,1,3.1
+0,2021-03-20 17:00:12.163319,1,2,3,4,2685.2,12.23,219.54,-0.66,1,3.08
+0,2021-03-20 17:00:19.995784,1,2,3,4,2685.07,12.22,219.68,-0.36,1,3.08
+0,2021-03-20 17:00:27.573684,1,2,3,4,2686.04,12.24,219.52,-1.1,1,3.01
+0,2021-03-20 17:00:35.414797,1,2,3,4,2685.6,12.23,219.53,-0.45,1,3.08
+0,2021-03-20 17:00:43.293562,1,2,3,4,2685.9,12.23,219.65,-0.7,1,3.09
+0,2021-03-20 17:00:50.582678,1,2,3,4,2685.56,12.22,219.72,-0.34,1,3.01
+0,2021-03-20 17:00:57.949684,1,2,3,4,2685.86,12.23,219.61,-0.38,1,3.08
+0,2021-03-20 17:01:05.742884,1,2,3,4,2686.83,12.23,219.72,-1.35,1,3.02
+0,2021-03-20 17:01:13.143254,1,2,3,4,2685.2,12.22,219.66,-0.75,1,3.09
+0,2021-03-20 17:01:19.653170,1,2,3,4,2685.74,12.23,219.64,-0.7,1,2.94
+0,2021-03-20 17:01:27.056636,1,2,3,4,2686.21,12.22,219.85,-0.26,1,3.09
+0,2021-03-20 17:01:34.509972,1,2,3,4,2685.91,12.22,219.72,-0.79,1,3.09
+0,2021-03-20 17:01:42.387612,1,2,3,4,2686.37,12.23,219.74,-0.4,1,3.09
+0,2021-03-20 17:01:49.777621,1,2,3,4,2686.1,12.23,219.66,-0.53,1,3.09
+0,2021-03-20 17:01:57.719793,1,2,3,4,2685.64,12.23,219.61,-0.14,1,3.09
+0,2021-03-20 17:02:05.577008,1,2,3,4,2685.64,12.22,219.7,-0.38,1,3.09
+0,2021-03-20 17:02:12.505155,1,2,3,4,2686.01,12.23,219.71,-0.76,1,3.09
+0,2021-03-20 17:02:20.381318,1,2,3,4,2685.56,12.22,219.77,-1.63,1,3.09
+0,2021-03-20 17:02:28.269241,1,2,3,4,2685.63,12.23,219.63,-0.36,1,3.09
+0,2021-03-20 17:02:35.866580,1,2,3,4,2686.39,12.23,219.57,-0.61,1,3.07
+0,2021-03-20 17:02:43.749463,1,2,3,4,2685.97,12.22,219.71,0.14,1,3.09
+0,2021-03-20 17:02:50.694851,1,2,3,4,2685.73,12.23,219.62,-0.04,1,3.09
+0,2021-03-20 17:02:58.661848,1,2,3,4,2685.28,12.23,219.58,-0.6,1,3.09
+0,2021-03-20 17:03:06.580448,1,2,3,4,2685.9,12.23,219.67,-0.56,1,3.09
+0,2021-03-20 17:03:14.473153,1,2,3,4,2686.15,12.22,219.83,-0.83,1,3.09
+0,2021-03-20 17:03:22.317458,1,2,3,4,2685.95,12.23,219.66,-1.08,1,3.08
+0,2021-03-20 17:03:30.168180,1,2,3,4,2685.59,12.23,219.57,-0.22,1,3.09
+0,2021-03-20 17:03:38.046861,1,2,3,4,2685.77,12.22,219.76,-0.48,1,3.09
+0,2021-03-20 17:03:45.991297,1,2,3,4,2686.63,12.22,219.77,-0.66,1,3.08
+0,2021-03-20 17:03:52.996330,1,2,3,4,2685.84,12.23,219.6,-0.18,1,2.85
+0,2021-03-20 17:04:00.382909,1,2,3,4,2685.89,12.22,219.86,-0.39,1,3.09
+0,2021-03-20 17:04:08.275238,1,2,3,4,2685.42,12.23,219.66,-0.43,1,3.1
+0,2021-03-20 17:04:16.097287,1,2,3,4,2686.32,12.22,219.76,-1.1,1,3.05
+0,2021-03-20 17:04:23.971150,1,2,3,4,2686.42,12.23,219.73,0.07,1,3.09
+0,2021-03-20 17:04:31.878500,1,2,3,4,2685.26,12.23,219.61,-0.69,1,3.09
+0,2021-03-20 17:04:39.752573,1,2,3,4,2686.09,12.23,219.7,-0.33,1,3.1
+0,2021-03-20 17:04:46.414440,1,2,3,4,2685.32,12.23,219.6,0.09,1,3.07
+0,2021-03-20 17:04:54.279289,1,2,3,4,2685.68,12.23,219.53,-0.62,1,3.11
+0,2021-03-20 17:05:02.179625,1,2,3,4,3003.16,11.61,258.69,259.7,1,3.1
+0,2021-03-20 17:05:10.101258,1,2,3,4,10693.76,4.23,2528.83,-3115.27,1,3.08
+0,2021-03-20 17:05:17.936064,1,2,3,4,1361.47,13.64,99.84,-0.34,1,3.08
+0,2021-03-20 17:05:24.839796,1,2,3,4,1362.55,13.64,99.92,0.08,1,3.08
+0,2021-03-20 17:05:32.130185,1,2,3,4,1362.58,13.63,99.96,-1.08,1,3.01
+0,2021-03-20 17:05:39.919929,1,2,3,4,1361.54,13.64,99.85,-0.13,1,3.08
+0,2021-03-20 17:05:46.867449,1,2,3,4,1362.09,13.65,99.77,0.16,1,3.16
+0,2021-03-20 17:05:54.025567,1,2,3,4,1362.02,13.65,99.79,-0.75,1,2.97
+0,2021-03-20 17:06:01.027148,1,2,3,4,1362.43,13.63,99.94,-0.79,1,3.02
+0,2021-03-20 17:06:08.029051,1,2,3,4,1362.58,13.65,99.81,-0.23,1,3.16
+0,2021-03-20 17:06:14.925939,1,2,3,4,1362.17,13.64,99.88,-0.97,1,3.04
+0,2021-03-20 17:07:46.196052,1,2,3,4,1362.87,13.64,99.94,-0.2,1,3.08
+0,2021-03-20 17:07:50.507190,2,3,4,5,-4547.67,24.85,-183.01,6922.17,1,3.08
+0,2021-03-20 17:07:54.801820,3,4,5,6,-2.3,25.6,-0.09,-1.57,1,3.09
+0,2021-03-20 17:07:59.122601,4,5,6,7,2.03,1.09,1.85,-0.48,1,3.09
+0,2021-03-20 17:08:03.430742,5,6,7,8,-1.49,1.1,-1.36,1.56,1,3.09
+0,2021-03-20 17:08:07.685361,6,7,8,9,-1.02,1.1,-0.92,-1.42,1,3.03
+0,2021-03-20 17:08:11.910147,7,8,9,10,-1.38,1.1,-1.26,0.28,1,3.0
+0,2021-03-20 17:08:16.218562,8,9,10,11,2.11,1.09,1.93,1.03,1,3.08
+0,2021-03-20 17:08:20.508021,9,10,11,12,0.29,1.1,0.27,4.02,1,3.07
+0,2021-03-20 17:08:24.811994,10,11,12,13,1.1,1.1,1.0,-1.27,1,3.08
+0,2021-03-20 17:08:29.121153,11,12,13,14,5.5,1.1,5.0,1.16,1,3.09
+0,2021-03-20 17:08:33.476495,12,13,14,15,1.97,1.1,1.79,-1.17,1,3.13
+0,2021-03-20 17:08:37.457549,13,14,15,16,-1.42,1.11,-1.28,0.88,1,2.8
+0,2021-03-20 17:08:41.680534,14,15,16,17,1.18,1.1,1.08,0.46,1,3.03
+0,2021-03-20 17:08:46.072734,15,16,17,18,0.39,1.1,0.35,-0.71,1,3.16
+0,2021-03-20 17:08:50.286644,16,17,18,19,-0.47,1.1,-0.43,1.29,1,3.0
+0,2021-03-20 17:08:54.634446,17,18,19,20,-1.03,1.1,-0.94,-2.25,1,3.13
+0,2021-03-20 17:08:59.007008,18,19,20,21,-0.09,1.1,-0.09,-2.53,1,3.12
+0,2021-03-20 17:09:03.175192,19,20,21,22,4.02,1.09,3.68,0.95,1,2.93
+0,2021-03-20 17:09:07.542857,20,21,22,23,-3.08,1.09,-2.82,-0.34,1,3.15
+0,2021-03-20 17:09:11.980114,21,22,23,24,0.07,1.11,0.06,1.76,1,3.2
+0,2021-03-20 17:09:16.288702,22,23,24,25,3.29,1.09,3.02,-1.16,1,3.08
+0,2021-03-20 17:09:20.592407,23,24,25,26,-1.69,1.1,-1.54,-1.5,1,3.09
+0,2021-03-20 17:09:24.860754,24,25,26,27,1.42,1.1,1.29,0.01,1,3.06
+0,2021-03-20 17:09:29.205209,25,26,27,28,-2.68,1.09,-2.45,0.93,1,3.11
+0,2021-03-20 17:09:33.415239,26,27,28,29,2.66,1.1,2.43,1.56,1,3.01
+0,2021-03-20 17:09:37.678240,27,28,29,30,-0.81,1.1,-0.73,0.46,1,3.03
+0,2021-03-20 17:09:41.992988,28,29,30,31,4.3,1.1,3.92,-4.91,1,3.09
+0,2021-03-20 17:09:46.302136,29,30,31,32,-2.18,1.09,-2.0,-0.14,1,3.09
+0,2021-03-20 17:09:50.633595,30,31,32,33,-0.66,1.09,-0.6,0.84,1,3.11
+0,2021-03-20 17:09:54.934562,31,32,33,34,4.75,1.1,4.31,0.41,1,3.09
+0,2021-03-20 17:09:59.249048,32,33,34,35,-1.73,1.1,-1.58,0.05,1,3.09
+0,2021-03-20 17:10:03.575664,33,34,35,36,-0.33,1.09,-0.3,0.3,1,3.1
+0,2021-03-20 17:10:07.904810,34,35,36,37,0.32,1.1,0.29,0.69,1,3.1
+0,2021-03-20 17:10:15.810584,1,2,3,4,1363.58,13.64,99.95,0.39,1,3.11
+0,2021-03-20 17:10:20.123749,2,3,4,5,-4547.72,24.83,-183.15,6921.54,1,3.09
+0,2021-03-20 17:10:24.436976,3,4,5,6,-2.44,25.6,-0.1,-0.77,1,3.09
diff --git a/ohmpi_param.json b/ohmpi_param.json
index 9e7e401a..1f5bddeb 100644
--- a/ohmpi_param.json
+++ b/ohmpi_param.json
@@ -1,8 +1,8 @@
 {
     "nb_electrodes": 64,
-    "injection_duration": 0.5,
+    "injection_duration": 0.250,
     "nbr_meas": 10000,
-    "sequence_delay": 5,
+    "sequence_delay": 0,
     "stack": 1,
     "export_path": "/home/pi/ohmpi1_5/measurement.csv" 
 }
diff --git a/test.py b/test.py
new file mode 100644
index 00000000..eb9a3290
--- /dev/null
+++ b/test.py
@@ -0,0 +1,40 @@
+import time , board, busio, numpy, os, sys, json, glob,os.path,adafruit_tca9548a
+import adafruit_ads1x15.ads1115 as ADS
+from adafruit_ads1x15.analog_in import AnalogIn
+from pandas import DataFrame
+from datetime import datetime
+from adafruit_mcp230xx.mcp23008 import MCP23008
+from adafruit_mcp230xx.mcp23017 import MCP23017
+import digitalio
+from digitalio import Direction
+current_time = datetime.now()
+print(current_time.strftime("%Y-%m-%d %H:%M:%S"))
+"""
+hardware parameters
+"""
+R_shunt = 0.2# reference resistance value in ohm
+coef_p2 = 2.50# slope for current conversion for ADS.P2, measurement in V/V
+coef_p3 = 2.50 # slope for current conversion for ADS.P3, measurement in V/V
+offset_p2= 0
+offset_p3= 0
+integer=10
+meas=numpy.zeros((3,integer))
+
+"""
+import parameters
+"""
+
+with open('ohmpi_param.json') as json_file:
+    pardict = json.load(json_file)
+
+
+i2c = busio.I2C(board.SCL, board.SDA) #activation du protocle I2C
+mcp = MCP23008(i2c, address=0x20) #connexion I2C MCP23008, injection de courant
+ads_current = ADS.ADS1115(i2c, gain=16,data_rate=860, address=0X48)# connexion ADS1115, pour la mesure de courant
+ads_voltage = ADS.ADS1115(i2c, gain=2/3,data_rate=860, address=0X49)# connexion ADS1115, pour la mesure de courant
+#initialisation desvoie pour la polarité
+pin0 = mcp.get_pin(0)
+pin0.direction = Direction.OUTPUT
+pin0.value = False
+pin0.value = False
+   
-- 
GitLab