From 058551cc725eab329af9d171638314ae834df370 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Thu, 22 Jun 2023 17:42:07 +0200 Subject: [PATCH] closes #86 --- src/nmreval/data/points.py | 2 +- src/nmreval/fit/result.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nmreval/data/points.py b/src/nmreval/data/points.py index cd3553a..bf9a438 100644 --- a/src/nmreval/data/points.py +++ b/src/nmreval/data/points.py @@ -484,7 +484,7 @@ class Points: return self - def set_data(self, x: np.ndarray = None, y: np.ndarray = None, y_err: np.ndarray = None, replace_mask=True) -> PointLike: + def set_data(self, x: np.ndarray = None, y: np.ndarray = None, y_err: np.ndarray | float = None, replace_mask: bool = True) -> PointLike: if x is None: x = self._x if y is None: diff --git a/src/nmreval/fit/result.py b/src/nmreval/fit/result.py index 65d340d..4d98cd8 100644 --- a/src/nmreval/fit/result.py +++ b/src/nmreval/fit/result.py @@ -387,7 +387,7 @@ class FitResult(Points): self.fun_kwargs['complex_mode'] = actual_mode - new_fit.set_data(x_values, y_values) + new_fit.set_data(x_values, y_values, y_err=0.0) return new_fit @@ -410,7 +410,7 @@ class FitResult(Points): else: part_functions.append(Points(x_values, sub_y, name=sub_name)) - if actual_mode < 0: + if actual_mode > 0: self.fun_kwargs['complex_mode'] = actual_mode return part_functions