From e2e52cebde3fe37a91e448f6206935e34b468bb9 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Thu, 7 Sep 2023 17:48:49 +0200 Subject: [PATCH] fixed overwrite of weight option for deltay, resulted in invalid weights; closes #117 --- src/gui_qt/main/management.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui_qt/main/management.py b/src/gui_qt/main/management.py index b9c6f4a..86d1b41 100644 --- a/src/gui_qt/main/management.py +++ b/src/gui_qt/main/management.py @@ -434,7 +434,7 @@ class UpperManagement(QtCore.QObject): models = {} fit_limits = fit_options['limits'] fit_mode = fit_options['fit_mode'] - we = fit_options['we'] + we_option = fit_options['we'] for model_id, model_p in parameter.items(): m = Model(model_p['func']) @@ -453,8 +453,10 @@ class UpperManagement(QtCore.QObject): data_i = self.data[set_id] set_params = model_p['parameter'][set_id] - if we.lower() == 'deltay': + if we_option.lower() == 'deltay': we = data_i.y_err**2 + else: + we = we_option if m_complex is None or m_complex == 1: _y = data_i.y.real