From a1cd03d91d818bb4b56569baab5032e33d854553 Mon Sep 17 00:00:00 2001 From: jupfi Date: Thu, 23 May 2024 16:40:22 +0200 Subject: [PATCH] Linting, minor improvements in visualization. --- src/nqrduck_measurement/controller.py | 2 -- src/nqrduck_measurement/signalprocessing_options.py | 1 - src/nqrduck_measurement/view.py | 10 ++++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/nqrduck_measurement/controller.py b/src/nqrduck_measurement/controller.py index 7002b87..8c0e49c 100644 --- a/src/nqrduck_measurement/controller.py +++ b/src/nqrduck_measurement/controller.py @@ -256,8 +256,6 @@ class MeasurementController(ModuleController): logger.debug("Fitting function: %s", fit) - params = fit.fit() - measurement.add_fit(fit) self.module.view.update_displayed_measurement() diff --git a/src/nqrduck_measurement/signalprocessing_options.py b/src/nqrduck_measurement/signalprocessing_options.py index 91d8f20..694c9cf 100644 --- a/src/nqrduck_measurement/signalprocessing_options.py +++ b/src/nqrduck_measurement/signalprocessing_options.py @@ -8,7 +8,6 @@ from nqrduck.helpers.formbuilder import ( DuckFormBuilder, DuckFormFunctionSelectionField, DuckFormDropdownField, - DuckLabelField, ) logger = logging.getLogger(__name__) diff --git a/src/nqrduck_measurement/view.py b/src/nqrduck_measurement/view.py index 72c31a3..237b3ab 100644 --- a/src/nqrduck_measurement/view.py +++ b/src/nqrduck_measurement/view.py @@ -256,7 +256,7 @@ class MeasurementView(ModuleView): x = fit.x y = fit.y self._ui_form.plotter.canvas.ax.plot( - x, y, label=f"{fit.name} Fit", color="black", linestyle="--" + x, y, label=f"{fit.name} Fit", linestyle="--" ) # Add the parameters to the plot @@ -299,7 +299,7 @@ class MeasurementView(ModuleView): logger.debug("Measurement save button clicked.") file_manager = self.FileManager( - self.module.model.FILE_EXTENSION, parent=self.widget + self.module.model.FILE_EXTENSION, parent=self ) file_name = file_manager.saveFileDialog() if file_name: @@ -311,7 +311,7 @@ class MeasurementView(ModuleView): logger.debug("Measurement load button clicked.") file_manager = self.FileManager( - self.module.model.FILE_EXTENSION, parent=self.widget + self.module.model.FILE_EXTENSION, parent=self ) file_name = file_manager.loadFileDialog() if file_name: @@ -468,7 +468,9 @@ class MeasurementView(ModuleView): class MeasurementEdit(QDialog): """This dialog is displayed when the measurement edit button is clicked. - It allows the user to edit the measurement parameters (e.g. name, ...).""" + + It allows the user to edit the measurement parameters (e.g. name, ...). + """ def __init__(self, measurement, parent=None) -> None: """Initialize the dialog."""