From 0d0794723ee198bc15a90b6c7f49d6133d07c233 Mon Sep 17 00:00:00 2001 From: su530201 <olivier.kaufmann@umons.ac.be> Date: Tue, 27 Jun 2023 17:13:11 +0200 Subject: [PATCH] Test duty_cycle in vab_square_wave --- ohmpi/hardware_system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ohmpi/hardware_system.py b/ohmpi/hardware_system.py index 88ea0895..e903bab2 100644 --- a/ohmpi/hardware_system.py +++ b/ohmpi/hardware_system.py @@ -345,7 +345,7 @@ class OhmPiHardware: if duty_cycle < 1.: durations = [cycle_duration/2 * duty_cycle, cycle_duration/2*(1.-duty_cycle)] * cycles pol = [-self.tx.polarity * np.heaviside(i % 2, -1.) for i in range(cycles)] - polarities = [0] * (len(cycles) * 2) + polarities = [0] * (len(pol) * 2) polarities[0::2] = pol else: durations = [cycle_duration / 2] * 2 * cycles -- GitLab