1
0
forked from IPKM/nmreval

only skip points if wanted

This commit is contained in:
Dominik Demuth 2024-09-23 16:38:28 +02:00
parent 4f0a7827ba
commit ac6b734f81
2 changed files with 5 additions and 4 deletions

View File

@ -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):

View File

@ -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])