Improvement of inject_analog_single for sync FE
Doing tests in Torino we noticed that having global pulse width equal to 8 and 9 and just 20 syncs after global pulse and ecr results in a higher noise rate due to the already known effects related to the end of the AZ period. So the suggestion is to increase the number of syncs from 20 to 60 (as shown below) in order to be sure than even width = 9 fits well.
def inject_analog_single(self, repetitions=1, latency=122, wait_cycles=400, send_ecr=False, write=True): ''' Injects a single analog pulse in all enabled pixels
----------
Parameters:
latency : int
Number of write_sync commands between injection and trigger
'''
indata = self.write_sync_01(write=False)
#indata += self.write_global_pulse(width=8, write=False)
if send_ecr:
indata += self.write_global_pulse(width=8, write=False)
indata += self.write_ecr(write=False)
indata += self.write_sync_01(write=False) * 60 #40 #20 --- FIX 10-9-2018
indata += self.write_cal(cal_edge_mode=0, cal_edge_width=1, cal_edge_dly=0, write=False) # CalEdge -> 1 (inject)
indata += self.write_sync_01(write=False) * latency # Wait for latency
indata += self.send_trigger(trigger=0b1111, write=False) * 8 # Trigger
indata += self.write_cal(cal_edge_mode=1, cal_edge_width=0, cal_edge_dly=0, write=False) # CalEdge -> 0
if self.board_version != 'SIMULATION':
indata += self.write_sync_01(write=False) * wait_cycles # Wait for data
if write:
self.write_command(indata, repetitions=repetitions)
return indata
Edited by Ennio Monteil