Exemplo n.º 1
0
 def _update_efficiency_label(self):
     """Updates the text of efficiency label.
     """
     self.efficiency_label.setText(
         df.get_multi_efficiency_text(
             self.measurementTreeWidget,
             self.simulation.sample.get_measurements(),
             data_func=lambda tpl: tpl[0]))
Exemplo n.º 2
0
    def __update_eff_files(self):
        """Update efficiency files to UI which are used.
        """
        if self.spectrum_type == _SIMU:
            # Simulation energy spectrum can contain cut files from multiple
            # Measurements which each can have different Detector an thus
            # different efficiency files
            label_txt = df.get_multi_efficiency_text(
                self.tof_list_tree_widget,
                self.simulation.sample.get_measurements(),
                data_func=lambda tpl: tpl[0])
        else:
            detector = self.measurement.get_detector_or_default()
            label_txt = df.get_efficiency_text(self.treeWidget, detector)

        self.label_efficiency_files.setText(label_txt)