コード例 #1
0
    def __init__(self, parent=None, state=None, settings=None, data_type=None):
        super(DiagnoseDetectorsWidget, self).__init__(parent, state, settings, data_type=data_type)

        class DiagDetsFrame(QtGui.QFrame, ui.inelastic.ui_dgs_diagnose_detectors.Ui_DiagDetsFrame):
            def __init__(self, parent=None):
                QtGui.QFrame.__init__(self, parent)
                self.setupUi(self)

        self._content = DiagDetsFrame(self)
        self._layout.addWidget(self._content)
        self.initialize_content()
        self._instrument_name = settings.instrument_name

        if state is not None:
            self.set_state(state)
        else:
            self.set_state(DiagnoseDetectorsScript(self._instrument_name))
コード例 #2
0
    def __init__(self, parent=None, state=None, settings=None, data_type=None):
        super(DiagnoseDetectorsWidget, self).__init__(parent,
                                                      state,
                                                      settings,
                                                      data_type=data_type)

        class DiagDetsFrame(QFrame):
            def __init__(self, parent=None):
                QFrame.__init__(self, parent)
                self.ui = load_ui(
                    __file__,
                    '../../../ui/inelastic/dgs_diagnose_detectors.ui',
                    baseinstance=self)

        self._content = DiagDetsFrame(self)
        self._layout.addWidget(self._content)
        self.initialize_content()
        self._instrument_name = settings.instrument_name

        if state is not None:
            self.set_state(state)
        else:
            self.set_state(DiagnoseDetectorsScript(self._instrument_name))
コード例 #3
0
 def get_state(self):
     """
         Returns an object with the state of the interface
     """
     d = DiagnoseDetectorsScript(self._instrument_name)
     d.high_counts = util._check_and_get_float_line_edit(
         self._content.high_counts_edit)
     d.low_counts = util._check_and_get_float_line_edit(
         self._content.low_counts_edit)
     d.median_test_high = util._check_and_get_float_line_edit(
         self._content.median_test_high_edit)
     d.median_test_low = util._check_and_get_float_line_edit(
         self._content.median_test_low_edit)
     d.median_test_out_high = util._check_and_get_float_line_edit(
         self._content.median_test_out_high_edit)
     d.median_test_out_low = util._check_and_get_float_line_edit(
         self._content.median_test_out_low_edit)
     d.errorbar_criterion = util._check_and_get_float_line_edit(
         self._content.errorbar_crit_edit)
     d.det_van2 = self._content.det_van2_edit.text()
     d.detvan_ratio_var = util._check_and_get_float_line_edit(
         self._content.ratio_var_crit_edit)
     d.background_check = self._content.background_check_gb.isChecked()
     d.sambkg_median_test_high = util._check_and_get_float_line_edit(
         self._content.sambkg_median_test_high_edit)
     d.sambkg_median_test_low = util._check_and_get_float_line_edit(
         self._content.sambkg_median_test_low_edit)
     d.sambkg_errorbar_criterion = util._check_and_get_float_line_edit(
         self._content.sambkg_errorbar_crit_edit)
     d.tof_start = util._check_and_get_float_line_edit(
         self._content.tof_start_edit)
     d.tof_end = util._check_and_get_float_line_edit(
         self._content.tof_end_edit)
     d.reject_zero_bkg = self._content.reject_zero_bg_cb.isChecked()
     d.psd_bleed = self._content.psd_bleed_gb.isChecked()
     d.max_framerate = util._check_and_get_float_line_edit(
         self._content.max_framerate_edit)
     d.ignored_pixels = util._check_and_get_float_line_edit(
         self._content.ignored_pixels_edit)
     return d
コード例 #4
0
 def get_state(self):
     """
         Returns an object with the state of the interface
     """
     d = DiagnoseDetectorsScript(self._instrument_name)
     d.high_counts = util._check_and_get_float_line_edit(self._content.high_counts_edit)
     d.low_counts = util._check_and_get_float_line_edit(self._content.low_counts_edit)
     d.median_test_high = util._check_and_get_float_line_edit(self._content.median_test_high_edit)
     d.median_test_low = util._check_and_get_float_line_edit(self._content.median_test_low_edit)
     d.median_test_out_high = util._check_and_get_float_line_edit(self._content.median_test_out_high_edit)
     d.median_test_out_low = util._check_and_get_float_line_edit(self._content.median_test_out_low_edit)
     d.errorbar_criterion = util._check_and_get_float_line_edit(self._content.errorbar_crit_edit)
     d.det_van2 = self._content.det_van2_edit.text()
     d.detvan_ratio_var = util._check_and_get_float_line_edit(self._content.ratio_var_crit_edit)
     d.background_check = self._content.background_check_gb.isChecked()
     d.sambkg_median_test_high = util._check_and_get_float_line_edit(self._content.sambkg_median_test_high_edit)
     d.sambkg_median_test_low = util._check_and_get_float_line_edit(self._content.sambkg_median_test_low_edit)
     d.sambkg_errorbar_criterion = util._check_and_get_float_line_edit(self._content.sambkg_errorbar_crit_edit)
     d.tof_start = util._check_and_get_float_line_edit(self._content.tof_start_edit)
     d.tof_end = util._check_and_get_float_line_edit(self._content.tof_end_edit)
     d.reject_zero_bkg = self._content.reject_zero_bg_cb.isChecked()
     d.psd_bleed = self._content.psd_bleed_gb.isChecked()
     d.max_framerate = util._check_and_get_float_line_edit(self._content.max_framerate_edit)
     d.ignored_pixels = util._check_and_get_float_line_edit(self._content.ignored_pixels_edit)
     return d