diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index df651ee87a7a522885a0c66650846c873400345a..488d0cbd4b03e1775d70e36c79741d49f0cb7667 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 088997824ae21beb63521fa203719ef2a8ab692c..1fdbbc822bc9b265c121f7115a53b56f4f07677f 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 """