Пример #1
0
    def setup_fit_options_table(self):
        self.fit_options_table.setRowCount(6)
        self.fit_options_table.setColumnCount(2)
        self.fit_options_table.setColumnWidth(0, 150)
        self.fit_options_table.setColumnWidth(1, 300)
        self.fit_options_table.verticalHeader().setVisible(False)
        self.fit_options_table.horizontalHeader().setStretchLastSection(True)
        self.fit_options_table.setHorizontalHeaderLabels(
            ("Property;Value").split(";"))

        table_utils.setRowName(self.fit_options_table, 0, "Time Start")
        self.time_start = table_utils.addDoubleToTable(self.fit_options_table,
                                                       0.0, 0, 1)

        table_utils.setRowName(self.fit_options_table, 1, "Time End")
        self.time_end = table_utils.addDoubleToTable(self.fit_options_table,
                                                     15.0, 1, 1)

        table_utils.setRowName(self.fit_options_table, 2, "Minimizer")
        self.minimizer_combo = table_utils.addComboToTable(
            self.fit_options_table, 2, [])
        self.minimizer_combo.addItems(allowed_minimizers)

        table_utils.setRowName(self.fit_options_table, 3, "Fit To Raw Data")
        self.fit_to_raw_data_checkbox = table_utils.addCheckBoxWidgetToTable(
            self.fit_options_table, True, 3)

        table_utils.setRowName(self.fit_options_table, 4, "TF Asymmetry Mode")
        self.tf_asymmetry_mode_checkbox = table_utils.addCheckBoxWidgetToTable(
            self.fit_options_table, False, 4)

        table_utils.setRowName(self.fit_options_table, 5,
                               "Evaluate Function As")
        self.evaluation_combo = table_utils.addComboToTable(
            self.fit_options_table, 5, ['CentrePoint', 'Histogram'])
Пример #2
0
    def _setup_fit_options_table(self) -> None:
        """Setup the fit options table with the appropriate options."""
        self.fit_options_table.setRowCount(8)
        self.fit_options_table.setColumnCount(2)
        self.fit_options_table.setColumnWidth(0, 150)
        self.fit_options_table.verticalHeader().setVisible(False)
        self.fit_options_table.horizontalHeader().setStretchLastSection(True)
        self.fit_options_table.setHorizontalHeaderLabels(["Property", "Value"])

        table_utils.setRowName(self.fit_options_table, START_X_TABLE_ROW, "Start X")
        self.start_x_line_edit, self.start_x_validator = table_utils.addDoubleToTable(self.fit_options_table, 0.0,
                                                                                      START_X_TABLE_ROW, 1)

        table_utils.setRowName(self.fit_options_table, END_X_TABLE_ROW, "End X")
        self.end_x_line_edit, self.end_x_validator = table_utils.addDoubleToTable(self.fit_options_table, 15.0,
                                                                                  END_X_TABLE_ROW, 1)

        table_utils.setRowName(self.fit_options_table, EXCLUDE_RANGE_TABLE_ROW, "Exclude Range")
        self.exclude_range_checkbox = table_utils.addCheckBoxWidgetToTable(
            self.fit_options_table, False, EXCLUDE_RANGE_TABLE_ROW)

        table_utils.setRowName(self.fit_options_table, EXCLUDE_START_X_TABLE_ROW, "Exclude Start X")
        self.exclude_start_x_line_edit, self.exclude_start_x_validator = table_utils.addDoubleToTable(
            self.fit_options_table, 15.0, EXCLUDE_START_X_TABLE_ROW, 1)

        table_utils.setRowName(self.fit_options_table, EXCLUDE_END_X_TABLE_ROW, "Exclude End X")
        self.exclude_end_x_line_edit, self.exclude_end_x_validator = table_utils.addDoubleToTable(
            self.fit_options_table, 15.0, EXCLUDE_END_X_TABLE_ROW, 1)

        table_utils.setRowName(self.fit_options_table, RAW_DATA_TABLE_ROW, "Fit To Raw Data")
        self.fit_to_raw_data_checkbox = table_utils.addCheckBoxWidgetToTable(
            self.fit_options_table, True, RAW_DATA_TABLE_ROW)

        table_utils.setRowName(self.fit_options_table, MINIMIZER_TABLE_ROW, "Minimizer")
        self.minimizer_combo = table_utils.addComboToTable(self.fit_options_table, MINIMIZER_TABLE_ROW, [])
        self.minimizer_combo.addItems(ALLOWED_MINIMIZERS)

        table_utils.setRowName(self.fit_options_table, EVALUATE_AS_TABLE_ROW, "Evaluate Function As")
        self.evaluation_combo = table_utils.addComboToTable(self.fit_options_table, EVALUATE_AS_TABLE_ROW,
                                                            ['CentrePoint', 'Histogram'])