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