From 1c9b8a1d522f95b10eeac547d602b34044628a9f Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 20 Mar 2016 15:29:31 +0800 Subject: [PATCH] test/coredevice/portability/pulses: compute time differences in MU --- artiq/test/coredevice/test_portability.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/artiq/test/coredevice/test_portability.py b/artiq/test/coredevice/test_portability.py index c1bce293b..43546edb8 100644 --- a/artiq/test/coredevice/test_portability.py +++ b/artiq/test/coredevice/test_portability.py @@ -67,17 +67,15 @@ class _PulseLogger(EnvExperiment): def _append(self, t, l, f): if not hasattr(self.parent_test, "first_timestamp"): self.parent_test.first_timestamp = t - self.parent_test.output_list.append( - (self.name, t-self.parent_test.first_timestamp, l, f)) - - def int_usec(self, mu): - return round(mu_to_seconds(mu, self.core)*1000000) + origin = self.parent_test.first_timestamp + t_usec = round(mu_to_seconds(t-origin, self.core)*1000000) + self.parent_test.output_list.append((self.name, t_usec, l, f)) def on(self, t, f): - self._append(self.int_usec(t), True, f) + self._append(t, True, f) def off(self, t): - self._append(self.int_usec(t), False, 0) + self._append(t, False, 0) @kernel def pulse(self, f, duration):