Hi,
I'm experimenting with time tagging input events from our PMT (pulse lengths of roughly 10ns) from a Doppler cooled ion (the Doppler cooling laser is constantly on, so there should be a constant stream of events coming from the PMT). I noticed that I receive an increased amount of events (or rather, that the TTL (SMA-DIO v1.4, software and gateware on ARTIQ 8) registers more events) near the end of the detection period, independent of the length of the detection period.
To trouble shoot if that is a PMT, coding or hardware issue I split the PMT events and fed them to two inputs. When reading the two inputs our simultaneously with the same detection time, I get (as expected) the same result.
However, when lengthening one detection time, during the first half/third of the detection window I receive the same amount of events, but in the second half/two thirds the events received differ significantly (see the attached picture).
The script used is shown below, together with the corresponding histograms that show the received events during the detection period.
Did someone experience something similar, or has an idea what the cause of the increased events at the end of the detection window could be?
import numpy as np
class dual_input(EnvExperiment):
"dual input"
def build(self):
self.setattr_device("core")
self.setattr_device("scheduler")
self.setattr_device("ttl0")
self.setattr_device("ttl2")
def prepare(self):
self.cycles = 50
self.max_timestamps = 1000
self.det_time_0 = 1000
self.det_time_1 = 1500
self.set_dataset('data.timestamps_0', np.full((self.cycles, self.max_timestamps), -1), persist=True)
self.timestamps_0 = np.full(self.max_timestamps, -1)
self.set_dataset('data.timestamps_1', np.full((self.cycles, self.max_timestamps), -1), persist=True)
self.timestamps_1 = np.full(self.max_timestamps, -1)
self.det_time_mu_0 = self.core.seconds_to_mu(self.det_time_0*us)
self.det_time_mu_1 = self.core.seconds_to_mu(self.det_time_1*us)
@kernel
def run(self):
self.core.reset()
for i in range(self.cycles):
# detect Doppler cooling photons
t0 = now_mu()
with parallel:
t_end_0 = self.ttl0.gate_rising_mu(self.det_time_mu_0)
t_end_1 = self.ttl2.gate_rising_mu(self.det_time_mu_1)
# read out the timestamps for counter 0
n_timestamp = 0
while n_timestamp < self.max_timestamps:
timestamp = self.ttl0.timestamp_mu(t_end_0)
if timestamp < 0:
break
self.timestamps_0[n_timestamp] = timestamp - t0
n_timestamp += 1
# read out the timestamps for counter 1
n_timestamp = 0
while n_timestamp < self.max_timestamps:
timestamp = self.ttl2.timestamp_mu(t_end_1)
if timestamp < 0:
break
self.timestamps_1[n_timestamp] = timestamp - t0
n_timestamp += 1
# update the scan progress
self.set_dataset('scan.progress', 100*(i+1)/self.cycles, persist=True)
# save the result
self.mutate_dataset('data.timestamps_0', i, self.timestamps_0)
self.mutate_dataset('data.timestamps_1', i, self.timestamps_1)
# wait until everything finished
delay(10*ms)
