From 5af2560ffe1afe5222fcc5077fc0145915156074 Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 19 Jul 2023 10:15:39 +0200 Subject: [PATCH 1/6] An additional option to disable the residuals. Note that : 1) the residuals are still computed even if the option is checked 2) the issues 2526 2527 still remains --- src/sas/qtgui/MainWindow/DataExplorer.py | 3 +++ .../Utilities/Preferences/PlottingPreferencesWidget.py | 10 +++++++++- src/sas/system/config/config.py | 4 ++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/sas/qtgui/MainWindow/DataExplorer.py b/src/sas/qtgui/MainWindow/DataExplorer.py index d0ebdddf54..bb412f78a4 100644 --- a/src/sas/qtgui/MainWindow/DataExplorer.py +++ b/src/sas/qtgui/MainWindow/DataExplorer.py @@ -1091,6 +1091,9 @@ def displayData(self, data_list, id=None): if (role in stand_alone_types and shown) or role == DataRole.ROLE_DELETABLE: # Nothing to do if stand-alone plot already shown or plot to be deleted continue + elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUALS: + # Nothing to do if residuals are not plotted + continue elif role in stand_alone_types: # Stand-alone plots should always be separate self.plotData([(plot_item, plot_to_show)]) diff --git a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py index 2f9f8dea07..5ed85100da 100644 --- a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py @@ -8,7 +8,8 @@ def __init__(self): super(PlottingPreferencesWidget, self).__init__("Plotting Options") self.config_params = ['FITTING_PLOT_FULL_WIDTH_LEGENDS', 'FITTING_PLOT_LEGEND_TRUNCATE', - 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH'] + 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH', + 'DISABLE_RESIDUALS'] def _addAllWidgets(self): self.legendFullWidth = self.addCheckBox( @@ -26,14 +27,21 @@ def _addAllWidgets(self): default_number=config.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH) self.legendLineLength.textChanged.connect( lambda: self._validate_input_and_stage(self.legendLineLength, 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH')) + self.disableResiduals = self.addCheckBox( + title="Disable Residuals Display", + checked=config.DISABLE_RESIDUALS) + self.disableResiduals.clicked.connect( + lambda: self._stageChange('DISABLE_RESIDUALS', self.disableResiduals.isChecked())) def _toggleBlockAllSignaling(self, toggle): self.legendFullWidth.blockSignals(toggle) self.legendTruncate.blockSignals(toggle) self.legendLineLength.blockSignals(toggle) + self.disableResiduals.blockSignals(toggle) def _restoreFromConfig(self): self.legendFullWidth.setChecked(bool(config.FITTING_PLOT_FULL_WIDTH_LEGENDS)) self.legendTruncate.setChecked(bool(config.FITTING_PLOT_LEGEND_TRUNCATE)) self.legendLineLength.setText(str(config.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH)) self.legendLineLength.setStyleSheet("background-color: white") + self.disableResiduals.setChecked(config.DISABLE_RESIDUALS) diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 816110eb90..05929c7955 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -197,6 +197,10 @@ def __init__(self): # sets the maximum number of characters per Fitting plot legend entry. self.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH = 30 + # Residuals management + # If true, disables residuals display + self.DISABLE_RESIDUALS = False + # Default fitting optimizer self.FITTING_DEFAULT_OPTIMIZER = 'lm' From 77034dea9956fedf0dce8079703cba7b1099ae7d Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 19 Jul 2023 10:31:19 +0200 Subject: [PATCH 2/6] An additional option to disable the polydispersity distribution plot. --- src/sas/qtgui/MainWindow/DataExplorer.py | 5 ++++- src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py | 2 +- src/sas/qtgui/Plotting/PlotterData.py | 2 ++ .../Utilities/Preferences/PlottingPreferencesWidget.py | 10 +++++++++- src/sas/system/config/config.py | 4 ++++ 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/sas/qtgui/MainWindow/DataExplorer.py b/src/sas/qtgui/MainWindow/DataExplorer.py index bb412f78a4..0623895a30 100644 --- a/src/sas/qtgui/MainWindow/DataExplorer.py +++ b/src/sas/qtgui/MainWindow/DataExplorer.py @@ -1086,7 +1086,7 @@ def displayData(self, data_list, id=None): plot_name = plot_to_show.name role = plot_to_show.plot_role - stand_alone_types = [DataRole.ROLE_RESIDUAL, DataRole.ROLE_STAND_ALONE] + stand_alone_types = [DataRole.ROLE_RESIDUAL, DataRole.ROLE_STAND_ALONE, DataRole.ROLE_POLYDISPERSITY] if (role in stand_alone_types and shown) or role == DataRole.ROLE_DELETABLE: # Nothing to do if stand-alone plot already shown or plot to be deleted @@ -1094,6 +1094,9 @@ def displayData(self, data_list, id=None): elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUALS: # Nothing to do if residuals are not plotted continue + elif role == DataRole.ROLE_POLYDISPERSITY and config.DISABLE_POLYDISPERSITY_PLOT: + # Nothing to do if polydispersity plot is not plotted + continue elif role in stand_alone_types: # Stand-alone plots should always be separate self.plotData([(plot_item, plot_to_show)]) diff --git a/src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py b/src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py index 825c66a628..48330b8090 100644 --- a/src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py +++ b/src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py @@ -643,7 +643,7 @@ def plotPolydispersities(model): data1d.symbol = 'Line' data1d.name = "{} polydispersity".format(name) data1d.id = data1d.name # placeholder, has to be completed later - data1d.plot_role = DataRole.ROLE_STAND_ALONE + data1d.plot_role = DataRole.ROLE_POLYDISPERSITY plots.append(data1d) return plots diff --git a/src/sas/qtgui/Plotting/PlotterData.py b/src/sas/qtgui/Plotting/PlotterData.py index 8fbaf7991e..e43539dcc0 100644 --- a/src/sas/qtgui/Plotting/PlotterData.py +++ b/src/sas/qtgui/Plotting/PlotterData.py @@ -27,6 +27,8 @@ class DataRole(Enum): ROLE_RESIDUAL = 3 # Stand alone is for plots that should be plotted separately ROLE_STAND_ALONE = 4 + # Polydispersity is for stand-alone polydispersity plot + ROLE_POLYDISPERSITY = 5 class Data1D(PlottableData1D, LoadData1D): diff --git a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py index 5ed85100da..f4c7869cd9 100644 --- a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py @@ -9,7 +9,8 @@ def __init__(self): self.config_params = ['FITTING_PLOT_FULL_WIDTH_LEGENDS', 'FITTING_PLOT_LEGEND_TRUNCATE', 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH', - 'DISABLE_RESIDUALS'] + 'DISABLE_RESIDUALS', + 'DISABLE_POLYDISPERSITY_PLOT'] def _addAllWidgets(self): self.legendFullWidth = self.addCheckBox( @@ -32,12 +33,18 @@ def _addAllWidgets(self): checked=config.DISABLE_RESIDUALS) self.disableResiduals.clicked.connect( lambda: self._stageChange('DISABLE_RESIDUALS', self.disableResiduals.isChecked())) + self.disablePolydispersityPlot = self.addCheckBox( + title="Disable Polydispersity Plot Display", + checked=config.DISABLE_POLYDISPERSITY_PLOT) + self.disablePolydispersityPlot.clicked.connect( + lambda: self._stageChange('DISABLE_POLYDISPERSITY_PLOT', self.disablePolydispersityPlot.isChecked())) def _toggleBlockAllSignaling(self, toggle): self.legendFullWidth.blockSignals(toggle) self.legendTruncate.blockSignals(toggle) self.legendLineLength.blockSignals(toggle) self.disableResiduals.blockSignals(toggle) + self.disablePolydispersityPlot.blockSignals(toggle) def _restoreFromConfig(self): self.legendFullWidth.setChecked(bool(config.FITTING_PLOT_FULL_WIDTH_LEGENDS)) @@ -45,3 +52,4 @@ def _restoreFromConfig(self): self.legendLineLength.setText(str(config.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH)) self.legendLineLength.setStyleSheet("background-color: white") self.disableResiduals.setChecked(config.DISABLE_RESIDUALS) + self.disablePolydispersityPlot.setChecked(config.DISABLE_POLYDISPERSITY_PLOT) diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 05929c7955..34efc0bd22 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -201,6 +201,10 @@ def __init__(self): # If true, disables residuals display self.DISABLE_RESIDUALS = False + # Polydispersity plot management + # If true, disables polydispersity plot display + self.DISABLE_POLYDISPERSITY_PLOT = False + # Default fitting optimizer self.FITTING_DEFAULT_OPTIMIZER = 'lm' From a627248444d985d91c81481f4e8ac6d025cc0b6e Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 19 Jul 2023 12:54:13 +0200 Subject: [PATCH 3/6] Buttons moved from Plotting Preferences to Display Preferences --- .../Preferences/DisplayPreferencesWidget.py | 19 ++++++++++++++++++- .../Preferences/PlottingPreferencesWidget.py | 18 +----------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py index abdd1d6143..c81b634c06 100644 --- a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py @@ -6,7 +6,10 @@ class DisplayPreferencesWidget(PreferencesWidget): def __init__(self): super(DisplayPreferencesWidget, self).__init__("Display Settings") - self.config_params = ['QT_SCALE_FACTOR', 'QT_AUTO_SCREEN_SCALE_FACTOR'] + self.config_params = ['QT_SCALE_FACTOR', + 'QT_AUTO_SCREEN_SCALE_FACTOR', + 'DISABLE_RESIDUALS', + 'DISABLE_POLYDISPERSITY_PLOT'] self.restart_params = {'QT_SCALE_FACTOR': 'QT Screen Scale Factor', 'QT_AUTO_SCREEN_SCALE_FACTOR': "Enable Automatic Scaling"} @@ -21,12 +24,26 @@ def _addAllWidgets(self): checked=config.QT_AUTO_SCREEN_SCALE_FACTOR) self.autoScaling.clicked.connect( lambda: self._stageChange('QT_AUTO_SCREEN_SCALE_FACTOR', self.autoScaling.isChecked())) + self.disableResiduals = self.addCheckBox( + title="Disable Residuals Display", + checked=config.DISABLE_RESIDUALS) + self.disableResiduals.clicked.connect( + lambda: self._stageChange('DISABLE_RESIDUALS', self.disableResiduals.isChecked())) + self.disablePolydispersityPlot = self.addCheckBox( + title="Disable Polydispersity Plot Display", + checked=config.DISABLE_POLYDISPERSITY_PLOT) + self.disablePolydispersityPlot.clicked.connect( + lambda: self._stageChange('DISABLE_POLYDISPERSITY_PLOT', self.disablePolydispersityPlot.isChecked())) def _toggleBlockAllSignaling(self, toggle): self.qtScaleFactor.blockSignals(toggle) self.autoScaling.blockSignals(toggle) + self.disableResiduals.blockSignals(toggle) + self.disablePolydispersityPlot.blockSignals(toggle) def _restoreFromConfig(self): self.qtScaleFactor.setText(str(config.QT_SCALE_FACTOR)) self.qtScaleFactor.setStyleSheet("background-color: white") self.autoScaling.setChecked(bool(config.QT_AUTO_SCREEN_SCALE_FACTOR)) + self.disableResiduals.setChecked(config.DISABLE_RESIDUALS) + self.disablePolydispersityPlot.setChecked(config.DISABLE_POLYDISPERSITY_PLOT) diff --git a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py index f4c7869cd9..2f9f8dea07 100644 --- a/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/PlottingPreferencesWidget.py @@ -8,9 +8,7 @@ def __init__(self): super(PlottingPreferencesWidget, self).__init__("Plotting Options") self.config_params = ['FITTING_PLOT_FULL_WIDTH_LEGENDS', 'FITTING_PLOT_LEGEND_TRUNCATE', - 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH', - 'DISABLE_RESIDUALS', - 'DISABLE_POLYDISPERSITY_PLOT'] + 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH'] def _addAllWidgets(self): self.legendFullWidth = self.addCheckBox( @@ -28,28 +26,14 @@ def _addAllWidgets(self): default_number=config.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH) self.legendLineLength.textChanged.connect( lambda: self._validate_input_and_stage(self.legendLineLength, 'FITTING_PLOT_LEGEND_MAX_LINE_LENGTH')) - self.disableResiduals = self.addCheckBox( - title="Disable Residuals Display", - checked=config.DISABLE_RESIDUALS) - self.disableResiduals.clicked.connect( - lambda: self._stageChange('DISABLE_RESIDUALS', self.disableResiduals.isChecked())) - self.disablePolydispersityPlot = self.addCheckBox( - title="Disable Polydispersity Plot Display", - checked=config.DISABLE_POLYDISPERSITY_PLOT) - self.disablePolydispersityPlot.clicked.connect( - lambda: self._stageChange('DISABLE_POLYDISPERSITY_PLOT', self.disablePolydispersityPlot.isChecked())) def _toggleBlockAllSignaling(self, toggle): self.legendFullWidth.blockSignals(toggle) self.legendTruncate.blockSignals(toggle) self.legendLineLength.blockSignals(toggle) - self.disableResiduals.blockSignals(toggle) - self.disablePolydispersityPlot.blockSignals(toggle) def _restoreFromConfig(self): self.legendFullWidth.setChecked(bool(config.FITTING_PLOT_FULL_WIDTH_LEGENDS)) self.legendTruncate.setChecked(bool(config.FITTING_PLOT_LEGEND_TRUNCATE)) self.legendLineLength.setText(str(config.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH)) self.legendLineLength.setStyleSheet("background-color: white") - self.disableResiduals.setChecked(config.DISABLE_RESIDUALS) - self.disablePolydispersityPlot.setChecked(config.DISABLE_POLYDISPERSITY_PLOT) From 28675a553d206684fade5a319e2b248c67bcd986 Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 26 Jul 2023 10:22:03 +0200 Subject: [PATCH 4/6] Renamed 'DISABLE_RESIDUALS_PLOT' the 'DISABLE_RESIDUALS' variable in config.py and 'disableResidualsPlot' the 'disableResiduals' widget in DisplayPreferencesWidget.py --- src/sas/qtgui/MainWindow/DataExplorer.py | 2 +- .../Preferences/DisplayPreferencesWidget.py | 14 +++++++------- src/sas/system/config/config.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sas/qtgui/MainWindow/DataExplorer.py b/src/sas/qtgui/MainWindow/DataExplorer.py index 0623895a30..35295c7270 100644 --- a/src/sas/qtgui/MainWindow/DataExplorer.py +++ b/src/sas/qtgui/MainWindow/DataExplorer.py @@ -1091,7 +1091,7 @@ def displayData(self, data_list, id=None): if (role in stand_alone_types and shown) or role == DataRole.ROLE_DELETABLE: # Nothing to do if stand-alone plot already shown or plot to be deleted continue - elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUALS: + elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUALS_PLOT: # Nothing to do if residuals are not plotted continue elif role == DataRole.ROLE_POLYDISPERSITY and config.DISABLE_POLYDISPERSITY_PLOT: diff --git a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py index c81b634c06..bfefabe479 100644 --- a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py @@ -8,7 +8,7 @@ def __init__(self): super(DisplayPreferencesWidget, self).__init__("Display Settings") self.config_params = ['QT_SCALE_FACTOR', 'QT_AUTO_SCREEN_SCALE_FACTOR', - 'DISABLE_RESIDUALS', + 'DISABLE_RESIDUALS_PLOT', 'DISABLE_POLYDISPERSITY_PLOT'] self.restart_params = {'QT_SCALE_FACTOR': 'QT Screen Scale Factor', 'QT_AUTO_SCREEN_SCALE_FACTOR': "Enable Automatic Scaling"} @@ -24,11 +24,11 @@ def _addAllWidgets(self): checked=config.QT_AUTO_SCREEN_SCALE_FACTOR) self.autoScaling.clicked.connect( lambda: self._stageChange('QT_AUTO_SCREEN_SCALE_FACTOR', self.autoScaling.isChecked())) - self.disableResiduals = self.addCheckBox( + self.disableResidualsPlot = self.addCheckBox( title="Disable Residuals Display", - checked=config.DISABLE_RESIDUALS) - self.disableResiduals.clicked.connect( - lambda: self._stageChange('DISABLE_RESIDUALS', self.disableResiduals.isChecked())) + checked=config.DISABLE_RESIDUALS_PLOT) + self.disableResidualsPlot.clicked.connect( + lambda: self._stageChange('DISABLE_RESIDUALS_PLOT', self.disableResidualsPlot.isChecked())) self.disablePolydispersityPlot = self.addCheckBox( title="Disable Polydispersity Plot Display", checked=config.DISABLE_POLYDISPERSITY_PLOT) @@ -38,12 +38,12 @@ def _addAllWidgets(self): def _toggleBlockAllSignaling(self, toggle): self.qtScaleFactor.blockSignals(toggle) self.autoScaling.blockSignals(toggle) - self.disableResiduals.blockSignals(toggle) + self.disableResidualsPlot.blockSignals(toggle) self.disablePolydispersityPlot.blockSignals(toggle) def _restoreFromConfig(self): self.qtScaleFactor.setText(str(config.QT_SCALE_FACTOR)) self.qtScaleFactor.setStyleSheet("background-color: white") self.autoScaling.setChecked(bool(config.QT_AUTO_SCREEN_SCALE_FACTOR)) - self.disableResiduals.setChecked(config.DISABLE_RESIDUALS) + self.disableResidualsPlot.setChecked(config.DISABLE_RESIDUALS_PLOT) self.disablePolydispersityPlot.setChecked(config.DISABLE_POLYDISPERSITY_PLOT) diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 34efc0bd22..07b777b92f 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -199,7 +199,7 @@ def __init__(self): # Residuals management # If true, disables residuals display - self.DISABLE_RESIDUALS = False + self.DISABLE_RESIDUALS_PLOT = False # Polydispersity plot management # If true, disables polydispersity plot display From a08077a7824f55de8dce83a05695fc1f14f19d93 Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 26 Jul 2023 10:32:36 +0200 Subject: [PATCH 5/6] Typo 'Residuals' -> 'Residual' --- src/sas/qtgui/MainWindow/DataExplorer.py | 2 +- .../Preferences/DisplayPreferencesWidget.py | 14 +++++++------- src/sas/system/config/config.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sas/qtgui/MainWindow/DataExplorer.py b/src/sas/qtgui/MainWindow/DataExplorer.py index 35295c7270..4ad0f51e34 100644 --- a/src/sas/qtgui/MainWindow/DataExplorer.py +++ b/src/sas/qtgui/MainWindow/DataExplorer.py @@ -1091,7 +1091,7 @@ def displayData(self, data_list, id=None): if (role in stand_alone_types and shown) or role == DataRole.ROLE_DELETABLE: # Nothing to do if stand-alone plot already shown or plot to be deleted continue - elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUALS_PLOT: + elif role == DataRole.ROLE_RESIDUAL and config.DISABLE_RESIDUAL_PLOT: # Nothing to do if residuals are not plotted continue elif role == DataRole.ROLE_POLYDISPERSITY and config.DISABLE_POLYDISPERSITY_PLOT: diff --git a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py index bfefabe479..da535cb4f6 100644 --- a/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py +++ b/src/sas/qtgui/Utilities/Preferences/DisplayPreferencesWidget.py @@ -8,7 +8,7 @@ def __init__(self): super(DisplayPreferencesWidget, self).__init__("Display Settings") self.config_params = ['QT_SCALE_FACTOR', 'QT_AUTO_SCREEN_SCALE_FACTOR', - 'DISABLE_RESIDUALS_PLOT', + 'DISABLE_RESIDUAL_PLOT', 'DISABLE_POLYDISPERSITY_PLOT'] self.restart_params = {'QT_SCALE_FACTOR': 'QT Screen Scale Factor', 'QT_AUTO_SCREEN_SCALE_FACTOR': "Enable Automatic Scaling"} @@ -24,11 +24,11 @@ def _addAllWidgets(self): checked=config.QT_AUTO_SCREEN_SCALE_FACTOR) self.autoScaling.clicked.connect( lambda: self._stageChange('QT_AUTO_SCREEN_SCALE_FACTOR', self.autoScaling.isChecked())) - self.disableResidualsPlot = self.addCheckBox( + self.disableResidualPlot = self.addCheckBox( title="Disable Residuals Display", - checked=config.DISABLE_RESIDUALS_PLOT) - self.disableResidualsPlot.clicked.connect( - lambda: self._stageChange('DISABLE_RESIDUALS_PLOT', self.disableResidualsPlot.isChecked())) + checked=config.DISABLE_RESIDUAL_PLOT) + self.disableResidualPlot.clicked.connect( + lambda: self._stageChange('DISABLE_RESIDUAL_PLOT', self.disableResidualPlot.isChecked())) self.disablePolydispersityPlot = self.addCheckBox( title="Disable Polydispersity Plot Display", checked=config.DISABLE_POLYDISPERSITY_PLOT) @@ -38,12 +38,12 @@ def _addAllWidgets(self): def _toggleBlockAllSignaling(self, toggle): self.qtScaleFactor.blockSignals(toggle) self.autoScaling.blockSignals(toggle) - self.disableResidualsPlot.blockSignals(toggle) + self.disableResidualPlot.blockSignals(toggle) self.disablePolydispersityPlot.blockSignals(toggle) def _restoreFromConfig(self): self.qtScaleFactor.setText(str(config.QT_SCALE_FACTOR)) self.qtScaleFactor.setStyleSheet("background-color: white") self.autoScaling.setChecked(bool(config.QT_AUTO_SCREEN_SCALE_FACTOR)) - self.disableResidualsPlot.setChecked(config.DISABLE_RESIDUALS_PLOT) + self.disableResidualPlot.setChecked(config.DISABLE_RESIDUAL_PLOT) self.disablePolydispersityPlot.setChecked(config.DISABLE_POLYDISPERSITY_PLOT) diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 07b777b92f..244603a997 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -199,7 +199,7 @@ def __init__(self): # Residuals management # If true, disables residuals display - self.DISABLE_RESIDUALS_PLOT = False + self.DISABLE_RESIDUAL_PLOT = False # Polydispersity plot management # If true, disables polydispersity plot display From bb8f3b9d809856437d22d1dd3368f82ef5d73dd1 Mon Sep 17 00:00:00 2001 From: Dorian Lozano Date: Wed, 26 Jul 2023 12:51:36 +0200 Subject: [PATCH 6/6] Minor change in a docstring --- src/sas/system/config/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sas/system/config/config.py b/src/sas/system/config/config.py index 244603a997..d3fd556955 100644 --- a/src/sas/system/config/config.py +++ b/src/sas/system/config/config.py @@ -198,7 +198,7 @@ def __init__(self): self.FITTING_PLOT_LEGEND_MAX_LINE_LENGTH = 30 # Residuals management - # If true, disables residuals display + # If true, disables residual plot display self.DISABLE_RESIDUAL_PLOT = False # Polydispersity plot management