From e6a7d45a318ebccdf5a43a47477019b1c6929115 Mon Sep 17 00:00:00 2001
From: awatlet <arnaud.watlet@umons.ac.be>
Date: Fri, 20 Oct 2023 17:24:45 +0200
Subject: [PATCH] Updates doc in ohmpi.py and hardware_system.py

---
 ohmpi/hardware_system.py | 19 +++++++++++++++++++
 ohmpi/ohmpi.py           |  7 ++++---
 2 files changed, 23 insertions(+), 3 deletions(-)

diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py
index df651ee8..488d0cbd 100644
--- a/ohmpi/hardware_system.py
+++ b/ohmpi/hardware_system.py
@@ -529,6 +529,25 @@ class OhmPiHardware:
 
     def vab_square_wave(self, vab, cycle_duration, sampling_rate=None, cycles=3, polarity=1, duty_cycle=1.,
                         append=False):
+        """
+        Performs a Vab injection following a square wave and records full waveform data. Calls in function Vab_pulses.
+
+        Parameters
+        ----------
+        vab: float,
+            Injection voltage [V]
+        cycle_duration: float
+            Duration of one cycle within the square wave (in seconds)
+        sampling_rate: float, None Default None
+            Sampling rate for Rx readings
+        cycles: integer, Default: 3
+            Number of cycles
+        polarity: 1, 0 , -1
+            Starting polarity
+        duty_cycle: float (0 to 1)
+            Duty cycle of injection wave
+        append: bool, Default: False
+        """
         self.exec_logger.event(f'OhmPiHardware\tvab_square_wave\tbegin\t{datetime.datetime.utcnow()}')
         switch_pwr_off, switch_tx_pwr_off = False, False
         if self.pwr_state == 'off':
diff --git a/ohmpi/ohmpi.py b/ohmpi/ohmpi.py
index 08899782..1fdbbc82 100644
--- a/ohmpi/ohmpi.py
+++ b/ohmpi/ohmpi.py
@@ -471,9 +471,11 @@ class OhmPi(object):
             really create the route to the electrodes.
         nb_stack : int, optional
             Number of stacks. A stack is considered two pulses (one
-            positive, one negative).
+            positive, one negative).            If 0, we will look            for the best voltage.
         injection_duration : int, optional
             Injection time in seconds.
+        duty_cycle : float, optional, Default: 0.5
+            Duty cycle of injection square wave
         strategy : str, optional, default: constant
             Define injection strategy (if power is adjustable, otherwise constant tx_volt)
             Either:
@@ -496,8 +498,7 @@ class OhmPi(object):
             Minimum Vmn desired (used in strategy vmin)
             Default value set by config or boards specs
         tx_volt : float, optional  # TODO: change tx_volt to Vab
-            For power adjustable only. If specified, voltage will be imposed. If 0, we will look
-            for the best voltage.
+            For power adjustable only. If specified, voltage will be imposed.
         cmd_id : str, optional
             Unique command identifier
         """
-- 
GitLab