Table of Contents |
---|
...
After executing the initial configuration sequence here, you can start the charge injection sequence.
...
If you need to run it for all 4 asics, you need to perform the upper sequence 4 times, once for each ASIC. pass the asicIndex as a -1, run it, then send a trigger to acquire images.
The charge injection python function is as follows
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
def fnChargeInjection(self, dev):
with self.root.updateGroup(.25):
"""
One time set reg
"""
self.AsicTop.RegisterControlDualClock.SyncDelay.set(0)
if (self.TestChargeInjection.ASIC.get() == -1) :
startAsic = 0
endAsic = 4
else :
startAsic = self.TestChargeInjection.ASIC.get()
endAsic = self.TestChargeInjection.ASIC.get() + 1
for asicIndex in range(startAsic, endAsic, 1) :
print("Enabling ASIC {}".format(asicIndex))
self.Mv2Asic[asicIndex].enable.set(True)
self.Mv2Asic[asicIndex].FE_ACQ2GR_en.set(True)
self.Mv2Asic[asicIndex].FE_sync2GR_en.set(False)
self.Mv2Asic[asicIndex].test.set(1) # connecting charge injection
# Hard coding the first adc column group
lane_selected = np.zeros(384)
lane_selected[self.TestChargeInjection.FirstColumn.get() : self.TestChargeInjection.LastColumn.get() + 1] = 1
# lane_selected[0:63] = 1
for asicIndex in range(startAsic, endAsic, 1) :
self.Mv2Asic[asicIndex].InjEn_ePixM.set(1)
self.Mv2Asic[asicIndex].Pulser.set(int(0))
self.root.runControl.runState.set(0x0)
for pulse_value in range(1, 1023, 2):
self.TestChargeInjection.Progress.set(pulse_value/1023)
for asicIndex in range(startAsic, endAsic, 1) :
self.Mv2Asic[asicIndex].Pulser.set(int(pulse_value))
self.TestChargeInjection.PulserValue.set(self.Mv2Asic[asicIndex].Pulser.get())
for column in lane_selected:
if self.TestChargeInjection._runEn == False :
for asicIndex in range(startAsic, endAsic, 1) :
self.Mv2Asic[asicIndex].test.set(0)
return
else :
for asicIndex in range(startAsic, endAsic, 1) :
self.Mv2Asic[asicIndex].InjEn_ePixM.set(int(column))
self.Mv2Asic[asicIndex].ClkInj_ePixM.set(1)
# ff chain advances on falling edge of clock signal
self.Mv2Asic[asicIndex].ClkInj_ePixM.set(0)
self.root.Trigger()
#disabling charge INJECTION
for asicIndex in range(startAsic, endAsic, 1) :
self.Mv2Asic[asicIndex].test.set(0)
return |
The sequence of events to enable and execute charge injection are as follows