make log-spacing explicit option for custom fit x values (#227)
All checks were successful
Build AppImage / Explore-Gitea-Actions (push) Successful in 1m53s

closes #225
This commit is contained in:
2024-01-30 18:01:15 +00:00
parent 3626cfc7ea
commit 813e18a744
5 changed files with 159 additions and 90 deletions

View File

@ -984,7 +984,8 @@ class NMRMainWindow(QtWidgets.QMainWindow, Ui_BaseWindow):
res = w.exec()
if res:
p = w.values
x = linspace(p[0], p[1], num=p[2])
spacefunc = geomspace if p[3] else linspace
x = spacefunc(p[0], p[1], num=p[2])
self.management.extend_fits(sets, x)
@QtCore.pyqtSlot(name='on_action_create_fit_function_triggered')

View File

@ -613,7 +613,7 @@ class UpperManagement(QtCore.QObject):
continue
if not all(e is None for e in extrapolate):
spacefunc = np.geomspace if fit.islog else np.linspace
spacefunc = np.geomspace if extrapolate[3] else np.linspace
xmin = fit.x.min()
xmax = fit.x.max()