I'd like to be able to break up a single gate_rising listening event into multiple events.
Currently, we have a pmt connected to a ttl channel that listens for, let's say, 300 microseconds. We count ttl pulses from the pmt using the following code
with parallel:
self.detection.sw.pulse(300 * us)
gate_end = self.ttl0.gate_rising(300 * us) # end of parallel
pmt_counts = self.ttl0.count(gate_end)
delay(long_time * ms)
However, I'd like to break up that single 300 microsecond window into three 100 microsecond windows one immediately after the other. My first thought was to do this:
self.detection.sw.on()
gate_end = self.ttl0.gate_rising(100 * us)
pmt_counts_0 = self.ttl0.count(gate_end)
gate_end = self.ttl0.gate_rising(100 * us)
pmt_counts_1 = self.ttl0.count(gate_end)
gate_end = self.ttl0.gate_rising(100 * us)
pmt_counts_2 = self.ttl0.count(gate_end)
self.decetion.sw.off()
delay(long_time * ms)
However, since count() blocks, this is likely to cause an RTIOUnderflow. Is it possible to do the counting later when I know there will be longer delays such as:
with parallel:
self.detection.pulse(300 * us)
with sequential:
gate_end_0 = self.ttl0.gate_rising(100 * us)
gate_end_1 = self.ttl0.gate_rising(100 * us)
gate_end_2 = self.ttl0.gate_rising(100 * us) # end of parallel and sequential
pmt_counts_0 = self.ttl0.count(gate_end_0)
pmt_counts_1 = self.ttl0.count(gate_end_1)
pmt_counts_2 = self.ttl0.count(gate_end_2)
delay(long_time * ms)
Thanks!!