From e51a02d277f213c62ef146ccdb59cf101a9e73f4 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sat, 16 Sep 2023 17:42:59 +0200 Subject: [PATCH] improvement of t1 calc --- src/gui_qt/main/management.py | 7 +++++-- src/gui_qt/nmr/t1_from_tau.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index 62f3cb9..f5a0cc7 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -1152,12 +1152,15 @@ class UpperManagement(QtCore.QObject): @QtCore.pyqtSlot(dict) def calc_relaxation(self, opts: dict): + params = opts['pts'] if len(params) == 4: if params[3]: - _x = x1 = np.geomspace(params[0], params[1], num=params[2]) + _x = np.geomspace(params[0], params[1], num=params[2]) + x1 = np.geomspace(params[0], params[1], num=params[2]) else: - _x = x1 = np.linspace(params[0], params[1], num=params[2]) + _x = np.linspace(params[0], params[1], num=params[2]) + x1 = np.linspace(params[0], params[1], num=params[2]) if opts['axis1'] in ['t', 'invt1000']: t_p = opts['t_param'] diff --git a/src/gui_qt/nmr/t1_from_tau.py b/src/gui_qt/nmr/t1_from_tau.py index 261e0aa..8dbd10a 100644 --- a/src/gui_qt/nmr/t1_from_tau.py +++ b/src/gui_qt/nmr/t1_from_tau.py @@ -131,7 +131,7 @@ class QRelaxCalc(QtWidgets.QDialog, Ui_Dialog): self.verticalLayout_3.addWidget(_temp) def get_taus(self, dic: dict): - dic['tau_type'] = {0: 'raw', 1: 'mean', 2: 'peak', 3: 'logmean'}[self.xtype_combobox.currentIndex()] + dic['tau_type'] = {0: 'raw', 1: 'peak', 2: 'mean', 3: 'logmean'}[self.xtype_combobox.currentIndex()] dic['axis1'] = {self.radioButton: 'tau', self.radioButton_2: 'omega', self.radioButton_3: 't', self.radioButton_4: 'invt1000'}[self.buttonGroup.checkedButton()]