From 1ff462c4b1a3c4d1bff8c18d2a4bcb103b24f35c Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Fri, 21 Jul 2023 19:53:08 +0200 Subject: [PATCH] remove duplicate call of t1 calculate and t1 interpolation --- src/gui_qt/_py/t1dialog.py | 8 +++++--- src/gui_qt/main/mainwindow.py | 1 - src/gui_qt/nmr/t1widget.py | 2 ++ src/nmreval/io/dsc.py | 2 +- src/resources/_ui/t1dialog.ui | 3 +++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/gui_qt/_py/t1dialog.py b/src/gui_qt/_py/t1dialog.py index 7f6c421..f277459 100644 --- a/src/gui_qt/_py/t1dialog.py +++ b/src/gui_qt/_py/t1dialog.py @@ -1,10 +1,11 @@ # -*- coding: utf-8 -*- -# Form implementation generated from reading ui file 'resources/_ui/t1dialog.ui' +# Form implementation generated from reading ui file 'src/resources/_ui/t1dialog.ui' # -# Created by: PyQt5 UI code generator 5.12.3 +# Created by: PyQt5 UI code generator 5.15.9 # -# WARNING! All changes made in this file will be lost! +# WARNING: Any manual changes made to this file will be lost when pyuic5 is +# run again. Do not edit this file unless you know what you are doing. from PyQt5 import QtCore, QtGui, QtWidgets @@ -160,6 +161,7 @@ class Ui_t1dialog(object): self.tau_combox.addItem("") self.gridLayout_4.addWidget(self.tau_combox, 1, 0, 1, 2) self.checkBox_interpol = QtWidgets.QCheckBox(self.groupBox_3) + self.checkBox_interpol.setEnabled(False) self.checkBox_interpol.setObjectName("checkBox_interpol") self.gridLayout_4.addWidget(self.checkBox_interpol, 2, 0, 1, 2) self.graph_checkbox = QtWidgets.QCheckBox(self.groupBox_3) diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index 6973141..f5e9433 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -211,7 +211,6 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): self.ptsselectwidget.points_selected.connect(self.management.extract_points) - self.t1tauwidget.newData.connect(self.management.add_new_data) self.t1tauwidget.newData.connect(self.management.add_new_data) self.editsignalwidget.do_something.connect(self.management.apply) diff --git a/src/gui_qt/nmr/t1widget.py b/src/gui_qt/nmr/t1widget.py index 2521224..a4c9228 100644 --- a/src/gui_qt/nmr/t1widget.py +++ b/src/gui_qt/nmr/t1widget.py @@ -61,6 +61,8 @@ class QT1Widget(QtWidgets.QDialog, Ui_t1dialog): self.freq_combox.currentIndexChanged.connect(lambda x: self.update_model()) self.freq_spinbox.valueChanged.connect(lambda x: self.update_model()) + self.checkBox_interpol.setVisible(False) + self.update_specdens(0) self.update_coupling(0) diff --git a/src/nmreval/io/dsc.py b/src/nmreval/io/dsc.py index 2be1fa4..b531bd4 100644 --- a/src/nmreval/io/dsc.py +++ b/src/nmreval/io/dsc.py @@ -292,7 +292,7 @@ class DSCCalibrator: empty_y = empty_data[1] if self.sample.length(idx) != self.empty.length(idx_empty): with np.errstate(all='ignore'): - empty_y = interp1d(empty_data[2], empty_data[1], fill_value='extrapolate')(sample_data[2]) + empty_y = interp1d(empty_data[2]-empty_data[2, 0], empty_data[1], fill_value='extrapolate')(sample_data[2, 0]) sample_data[1] -= empty_y drift_value = sample_data.copy()[(2, 1), :] diff --git a/src/resources/_ui/t1dialog.ui b/src/resources/_ui/t1dialog.ui index e0438c1..b406232 100644 --- a/src/resources/_ui/t1dialog.ui +++ b/src/resources/_ui/t1dialog.ui @@ -451,6 +451,9 @@ + + false + Use minimon interpolation