diff --git a/src/gui_qt/main/mainwindow.py b/src/gui_qt/main/mainwindow.py index 713eb75..bf2825c 100644 --- a/src/gui_qt/main/mainwindow.py +++ b/src/gui_qt/main/mainwindow.py @@ -677,9 +677,10 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow): from ..math.skipping import QSkipDialog dial = QSkipDialog(self) - dial.exec() + res = dial.exec() - self.management.skip_points(**dial.get_arguments()) + if res: + self.management.skip_points(**dial.get_arguments()) @QtCore.pyqtSlot(name='on_action_coup_calc_triggered') def coupling_dialog(self): diff --git a/src/nmreval/distributions/energy.py b/src/nmreval/distributions/energy.py index 059b2a5..31331ed 100644 --- a/src/nmreval/distributions/energy.py +++ b/src/nmreval/distributions/energy.py @@ -95,7 +95,7 @@ def _integrate_c(func, omega: np.ndarray, temperature: np.ndarray, tau0: float, for o, t in product(omega, temperature): c = (c_double * 5)(o, tau0, e_m, e_b, t) user_data = cast(pointer(c), c_void_p) - area = quad(LowLevelCallable(func, user_data), 0, np.infty, epsabs=1e-13)[0] + area = quad(LowLevelCallable(func, user_data), 0, np.inf, epsabs=1e-13)[0] res.append(area) @@ -111,7 +111,7 @@ def _integrate_py(func, axis, temp, tau0, e_m, e_b): e_axis = np.linspace(max(0., e_m - 50*e_b), e_m + 50*e_b, num=5001) ret_val = [] for o, tt in product(x, temperature): - ret_val.append(simpson(func(e_axis, o, tau0, e_m, e_b, tt), e_axis)) + ret_val.append(simpson(y=func(e_axis, o, tau0, e_m, e_b, tt), x=e_axis)) ret_val = np.array(ret_val).reshape(x.shape[0], temperature.shape[0])