From a581ed1bf9a17dbb1e70195d99ce20267bb8e497 Mon Sep 17 00:00:00 2001
From: Clement Remi <remi.clement@irstea.fr>
Date: Sat, 14 Nov 2020 10:19:56 +0100
Subject: [PATCH] major correction about injection current procedure. adds a
 dead time after the power injection has been cut off

---
 Ohmpy.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Ohmpy.py b/Ohmpy.py
index 825781ba..5e8ed18e 100644
--- a/Ohmpy.py
+++ b/Ohmpy.py
@@ -117,6 +117,7 @@ def run_measurement(nb_stack, injection_deltat, Rref, coefp0, coefp1, coefp2, co
         Vm1 = AnalogIn(ads,ADS.P2).voltage * coefp2# reading voltage value on ADS channel A2
         Vn1 = AnalogIn(ads,ADS.P3).voltage * coefp3# reading voltage value on ADS channel A3
         GPIO.output(8, GPIO.LOW)# stop current injection
+        time.sleep(injection_deltat) # Dead time equivalent to the duration of the current injection pulse
         I1= (Ia1 - Ib1)/Rref
         sum_I=sum_I+I1
         Vmn1= (Vm1 - Vn1)    
-- 
GitLab