Пример #1
0
 def get_dac_dac(self, n_triggers, dac1, dac2):
     self.mask()
     for roc in self.dut.rocs():
         self.select_roc(roc)
         #TODO TB function has too long vector by one unit
         dac_range1 = roc.dac(dac1).range - 1
         dac_range2 = roc.dac(dac2).range - 1
         for pixel in roc.active_pixels():
             self.unmask(roc.number, pixel.col, pixel.row)
             n_hits = []
             ph_sum = []
             self.logger.debug(
                 'DacDac pix(%s,%s), nTrig: %s, dac1: %s, 0, %s, dac2: %s, 0, %s'
                 % (pixel.col, pixel.row, n_triggers, dac1, dac_range1,
                    dac2, dac_range2))
             self.dac_dac(n_triggers, pixel.col, pixel.row,
                          roc.dac(dac1).number, dac_range1,
                          roc.dac(dac2).number, dac_range2, n_hits, ph_sum)
             #self.roc_clr_cal()
             self.set_dac_roc(roc, dac1, roc.dac(dac1).value)
             self.set_dac_roc(roc, dac2, roc.dac(dac2).value)
             pixel.data = numpy.transpose(
                 list_to_matrix(dac_range1, dac_range2, n_hits))
             self.mask(roc.number, pixel.col, pixel.row)
     self.unmask()
Пример #2
0
 def get_dac_dac(self, n_triggers, dac1, dac2):
     for roc in self.dut.rocs():
         self.select_roc(roc)
         #TODO TB function has too long vector by one unit
         dac_range1 = roc.dac(dac1).range-1
         dac_range2 = roc.dac(dac2).range-1
         n_results = dac_range1*dac_range2
         for pixel in roc.active_pixels():
             n_hits = []
             ph_sum = []
             self.logger.debug('DacDac pix(%s,%s), nTrig: %s, dac1: %s, 0, %s, dac2: %s, 0, %s' %(pixel.col,pixel.row, n_triggers, dac1, dac_range1, dac2, dac_range2) )
             self.dac_dac(n_triggers, pixel.col, pixel.row, roc.dac(dac1).number, dac_range1, roc.dac(dac2).number, dac_range2, n_hits, ph_sum)
             self.set_dac_roc(roc,dac1,roc.dac(dac1).value)
             self.set_dac_roc(roc,dac2,roc.dac(dac2).value)
             pixel.data = numpy.transpose(list_to_matrix(dac_range1, dac_range2, n_hits))
Пример #3
0
 def get_threshold(self, n_triggers, dac, xtalk, cals, reverse):
     #TODO Don't hardcode pars, they will go away with new CTestboard
     start = 0
     step = 1
     if reverse: 
         step = -1
     thr_level = int(n_triggers/2.)
     for roc in self.dut.rocs():
         self.select_roc(roc)
         self.logger.info('Start: %s, step: %s, thr_level: %s, n_triggers: %s, dac: %s, num: %s, xtalk: %s, cals: %s' %(start, step, thr_level, n_triggers, dac, roc.dac(dac).number, xtalk, cals))
         result = [0] * roc.n_pixels
         #TODO remove trimming, they will go away with new CTestboard
         self.chip_threshold(start, step, thr_level, n_triggers, roc.dac(dac).number , xtalk, cals, result)
         self.set_dac_roc(roc,dac,roc.dac(dac).value)
         roc.data = list_to_matrix(roc.n_cols, roc.n_rows, result)
     return self.dut.data
Пример #4
0
 def get_threshold(self, n_triggers, dac, xtalk, cals, reverse):
     #TODO Don't hardcode pars, they will go away with new CTestboard
     start = 0
     step = 1
     if reverse:
         step = -1
     thr_level = int(n_triggers / 2.)
     for roc in self.dut.rocs():
         self.select_roc(roc)
         self.logger.info(
             'Start: %s, step: %s, thr_level: %s, n_triggers: %s, dac: %s, num: %s, xtalk: %s, cals: %s'
             % (start, step, thr_level, n_triggers, dac,
                roc.dac(dac).number, xtalk, cals))
         result = [0] * roc.n_pixels
         #TODO remove trimming, they will go away with new CTestboard
         self.chip_threshold(start, step, thr_level, n_triggers,
                             roc.dac(dac).number, xtalk, cals, result)
         self.set_dac_roc(roc, dac, roc.dac(dac).value)
         roc.data = list_to_matrix(roc.n_cols, roc.n_rows, result)
     return self.dut.data