コード例 #1
0
ファイル: mainwindow.py プロジェクト: TaizoAyase/FSECplotter2
    def y_scaling(self):
        n = self.treeview.model.rowCount()
        filenames = get_enabled_filename(self.treeview.model)
        y_scale_dialog = YaxisScaleDialog(filenames, self)

        # show in modal dialog
        if y_scale_dialog.exec_():
            min_volume = y_scale_dialog.ui.lineEdit.text()
            max_volume = y_scale_dialog.ui.lineEdit_2.text()
            #c_volume = y_scale_dialog.ui.lineEdit.text()
            #file_norm = y_scale_dialog.ui.filename_for_normal.currentIndex()

            scale_factor = calc_yscale_factor(self.treeview.model, float(min_volume), float(max_volume))
            self.plotarea.rescale(scale_factor)
コード例 #2
0
    def accept(self):
        if not self.ui.lineEdit.text():
            return

        min_vol = float(self.ui.lineEdit.text())
        max_vol = float(self.ui.lineEdit_2.text())
        if min_vol > max_vol:
            return

        temp_list = np.array(self.get_temperature())
        scale_factor = calc_yscale_factor(self.model, min_vol, max_vol)

        tmplot_dialog = TmFitDialog(self)
        try:
            tmplot_dialog.fit(temp_list, scale_factor)
        except RuntimeError as e:
            return
        tmplot_dialog.exec_()
        super().accept()