Example #1
0
	def analyze(self):
		plots = False
		h5_filename = self.output_filename + '.h5'
		with tb.open_file(h5_filename, 'r+') as in_file_h5:
			raw_data = in_file_h5.root.raw_data[:]
			meta_data = in_file_h5.root.meta_data[:]
			hit_data = self.dut.interpret_raw_data(raw_data, meta_data)
			in_file_h5.createTable(in_file_h5.root, 'hit_data', hit_data, filters=self.filter_tables)
			hits = hit_data['col'].astype(np.uint16)
			hits = hits * 64
			hits = hits + hit_data['row']
			value = np.bincount(hits)
			value = np.pad(value, (0, 64*64 - value.shape[0]), 'constant')
			full_occupation = np.full(4096, 100, dtype=int)
			difference = full_occupation - value
			tot_diff = abs(np.sum(difference))
			if tot_diff<10000: plots=True;
			self.not_fired.append(tot_diff)
			logging.info('Shmoo plot entry: %s', str(tot_diff))

		if plots == True:
			occ_plot, H = plotting.plot_occupancy(h5_filename)
			tot_plot, _ = plotting.plot_tot_dist(h5_filename)
			lv1id_plot, _ = plotting.plot_lv1id_dist(h5_filename)
			output_file(self.output_filename + '.html', title=self.run_name)
			save(vplot(occ_plot, tot_plot, lv1id_plot))
			return H
Example #2
0
	def analyze(self):
		plots = False
		h5_filename = self.output_filename + '.h5'
		with tb.open_file(h5_filename, 'r+') as in_file_h5:
			raw_data = in_file_h5.root.raw_data[:]
			meta_data = in_file_h5.root.meta_data[:]
			hit_data = self.dut.interpret_raw_data(raw_data, meta_data)
			in_file_h5.createTable(in_file_h5.root, 'hit_data', hit_data, filters=self.filter_tables)
			hits = hit_data['col'].astype(np.uint16)
			hits = hits * 64
			hits = hits + hit_data['row']
			value = np.bincount(hits)
			value = np.pad(value, (0, 64*64 - value.shape[0]), 'constant')
			full_occupation = np.full(4096, 100, dtype=int)
			difference = full_occupation - value
			tot_diff = abs(np.sum(difference))
			if tot_diff<400000: plots=True
			self.not_fired.append(tot_diff)
			logging.info('Shmoo plot entry: %s', str(tot_diff))

		if plots == True:
			occ_plot, H = plotting.plot_occupancy(h5_filename)
			tot_plot, _ = plotting.plot_tot_dist(h5_filename)
			lv1id_plot, _ = plotting.plot_lv1id_dist(h5_filename)
			output_file(self.output_filename + '.html', title=self.run_name)
			save(vplot(occ_plot, tot_plot, lv1id_plot))
			return H
Example #3
0
    def analyze(self):
        h5_filename = self.output_filename +'.h5'
        
        with tb.open_file(h5_filename, 'r+') as in_file_h5:
            raw_data = in_file_h5.root.raw_data[:]
            meta_data = in_file_h5.root.meta_data[:]
            
            hit_data = self.dut.interpret_raw_data(raw_data, meta_data)
            in_file_h5.createTable(in_file_h5.root, 'hit_data', hit_data, filters=self.filter_tables)
            
        occ_plot, H = plotting.plot_occupancy(h5_filename)
        tot_plot,_ = plotting.plot_tot_dist(h5_filename)
        lv1id_plot, _ = plotting.plot_lv1id_dist(h5_filename)

        output_file(self.output_filename + '.html', title=self.run_name)
        save(vplot(occ_plot, tot_plot, lv1id_plot))
            
        return H
Example #4
0
 def analyze(self):
     h5_filename = self.output_filename +'.h5'
     
     with tb.open_file(h5_filename, 'r+') as in_file_h5:
         raw_data = in_file_h5.root.raw_data[:]
         meta_data = in_file_h5.root.meta_data[:]
         
         hit_data = self.dut.interpret_raw_data(raw_data, meta_data)
         in_file_h5.createTable(in_file_h5.root, 'hit_data', hit_data, filters=self.filter_tables)
        
     status_plot = plotting.plot_status(h5_filename)
     occ_plot, H = plotting.plot_occupancy(h5_filename)
     tot_plot,_ = plotting.plot_tot_dist(h5_filename)
     lv1id_plot, _ = plotting.plot_lv1id_dist(h5_filename)
     scan_pix_hist, _ = plotting.scan_pix_hist(h5_filename)                   
              
     output_file(self.output_filename + '.html', title=self.run_name)
     save(vplot(hplot(occ_plot, tot_plot, lv1id_plot), scan_pix_hist, status_plot))
Example #5
0
    def analyze(self):
        h5_filename = self.output_filename +'.h5'
        with tb.open_file(h5_filename, 'r+') as in_file_h5:
            raw_data = in_file_h5.root.raw_data[:]
            meta_data = in_file_h5.root.meta_data[:]

            hit_data = self.dut.interpret_raw_data(raw_data, meta_data)
            in_file_h5.createTable(in_file_h5.root, 'hit_data', hit_data, filters=self.filter_tables)

        analysis.analyze_threshold_scan(h5_filename)
        status_plot = plotting.plot_status(h5_filename)
        occ_plot, H = plotting.plot_occupancy(h5_filename)
        tot_plot,_ = plotting.plot_tot_dist(h5_filename)
        lv1id_plot, _ = plotting.plot_lv1id_dist(h5_filename)
        scan_pix_hist, _ = plotting.scan_pix_hist(h5_filename)
        t_dac = plotting.t_dac_plot(h5_filename)

        output_file(self.output_filename + '.html', title=self.run_name)
        save(vplot(hplot(occ_plot, tot_plot, lv1id_plot), scan_pix_hist, t_dac, status_plot))