From 9f324b559b51d3cc1c67de2a642def1c52eb6453 Mon Sep 17 00:00:00 2001
From: arnaud <arnaud.watlet@umons.ac.be>
Date: Mon, 11 Sep 2023 08:31:36 +0000
Subject: [PATCH] Changes test_3_mux

---
 dev/test_3_mux_2024.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/dev/test_3_mux_2024.py b/dev/test_3_mux_2024.py
index eaf6b3b2..b31090e5 100644
--- a/dev/test_3_mux_2024.py
+++ b/dev/test_3_mux_2024.py
@@ -53,18 +53,22 @@ if within_ohmpi:
     k._hw.vab_square_wave(12.,12., cycles=2)
     k._hw.switch_mux([A, B, M, N], state='off')
     k._hw.calibrate_rx_bias()  # electrodes 1 4 2 3 should be connected to a reference circuit
+    #k._hw.rx._bias = -1.38
     # print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
     # k._hw._plot_readings()
+    A, B, M, N = (28, 25, 27, 26)
     k._hw.switch_mux([A, B, M, N], state='on')
-    k._hw.vab_square_wave(3., 1)
+    k._hw.vab_square_wave(12., cycle_duration=1., cycles=3)
     k._hw.switch_mux([A, B, M, N], state='off')
-    print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
+    print(f'OhmPiHardware Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
     k._hw._plot_readings()
     print('using OhmPi')
-    d = k.run_measurement([A, B, M, N], injection_duration=6.)
+    d = k.run_measurement([A, B, M, N], injection_duration=.5, nb_stack=3)
     print(d)
     # k._hw._plot_readings()
-    print(f'Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
-    k._hw._plot_readings(save_fig=True)
+    print(f'OhmPiHardware: Resistance: {k._hw.last_rho :.2f} ohm, dev. {k._hw.last_dev:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
+    print(f'OhmPi: Resistance: {d["R [ohm]"] :.2f} ohm, dev. {d["R_std [%]"]:.2f} %, rx bias: {k._hw.rx._bias:.2f} mV')
+    k._hw._plot_readings(save_fig=False)
     # plot_exec_log('ohmpi/logs/exec.log')
 change_config('../configs/config_default.py', verbose=False)
+
-- 
GitLab