mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-09-19 10:50:36 +00:00
Linting, minor improvements in visualization.
This commit is contained in:
parent
b14391e6a7
commit
a1cd03d91d
3 changed files with 6 additions and 7 deletions
|
@ -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()
|
||||
|
|
|
@ -8,7 +8,6 @@ from nqrduck.helpers.formbuilder import (
|
|||
DuckFormBuilder,
|
||||
DuckFormFunctionSelectionField,
|
||||
DuckFormDropdownField,
|
||||
DuckLabelField,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -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."""
|
||||
|
|
Loading…
Reference in a new issue