We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 278570f commit ebbbdcfCopy full SHA for ebbbdcf
examples/master/repository/tdr.py
@@ -49,27 +49,23 @@ def run(self):
49
print("rising: {:5g} ns, falling {:5g} ns".format(
50
t_rise/1e-9, t_fall/1e-9))
51
52
- def rep(self, t):
53
- self.t = t
54
-
55
@kernel
56
def many(self, n, p):
57
t = [0 for i in range(2)]
58
self.core.break_realtime()
59
for i in range(n):
60
self.one(t, p)
61
- self.rep(t)
+ self.t = t
62
63
64
def one(self, t, p):
+ t0 = now_mu()
65
with parallel:
66
self.pmt0.gate_both_mu(2*p)
67
- with sequential:
68
- t0 = now_mu()
69
- self.ttl2.pulse_mu(p)
+ self.ttl2.pulse_mu(p)
70
for i in range(len(t)):
71
ti = self.pmt0.timestamp_mu()
72
if ti <= 0:
73
raise PulseNotReceivedError
74
t[i] += ti - t0
75
- self.pmt0.count()
+ self.pmt0.count() # flush
0 commit comments