diff --git a/easyDiffractionApp/Logic/Fitting.py b/easyDiffractionApp/Logic/Fitting.py index 9fd76e90..f122054d 100644 --- a/easyDiffractionApp/Logic/Fitting.py +++ b/easyDiffractionApp/Logic/Fitting.py @@ -67,6 +67,17 @@ def fit_threading(self): x = exp_data.x y = exp_data.y + component = self.parent.l_experiment.spinComponent() + is_polar = self.parent.l_experiment.spin_polarized + y = exp_data.y + exp_data.yb + if is_polar: + if component == "Difference": + y = exp_data.y - exp_data.yb + elif component == "Up": + y = exp_data.y + elif component == "Down": + y = exp_data.yb + weights = 1 / exp_data.e kwargs = {