mirror of
https://github.com/nqrduck/nqrduck-measurement.git
synced 2024-11-09 20:00:02 +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)
|
logger.debug("Fitting function: %s", fit)
|
||||||
|
|
||||||
params = fit.fit()
|
|
||||||
|
|
||||||
measurement.add_fit(fit)
|
measurement.add_fit(fit)
|
||||||
|
|
||||||
self.module.view.update_displayed_measurement()
|
self.module.view.update_displayed_measurement()
|
||||||
|
|
|
@ -8,7 +8,6 @@ from nqrduck.helpers.formbuilder import (
|
||||||
DuckFormBuilder,
|
DuckFormBuilder,
|
||||||
DuckFormFunctionSelectionField,
|
DuckFormFunctionSelectionField,
|
||||||
DuckFormDropdownField,
|
DuckFormDropdownField,
|
||||||
DuckLabelField,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
|
@ -256,7 +256,7 @@ class MeasurementView(ModuleView):
|
||||||
x = fit.x
|
x = fit.x
|
||||||
y = fit.y
|
y = fit.y
|
||||||
self._ui_form.plotter.canvas.ax.plot(
|
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
|
# Add the parameters to the plot
|
||||||
|
@ -299,7 +299,7 @@ class MeasurementView(ModuleView):
|
||||||
logger.debug("Measurement save button clicked.")
|
logger.debug("Measurement save button clicked.")
|
||||||
|
|
||||||
file_manager = self.FileManager(
|
file_manager = self.FileManager(
|
||||||
self.module.model.FILE_EXTENSION, parent=self.widget
|
self.module.model.FILE_EXTENSION, parent=self
|
||||||
)
|
)
|
||||||
file_name = file_manager.saveFileDialog()
|
file_name = file_manager.saveFileDialog()
|
||||||
if file_name:
|
if file_name:
|
||||||
|
@ -311,7 +311,7 @@ class MeasurementView(ModuleView):
|
||||||
logger.debug("Measurement load button clicked.")
|
logger.debug("Measurement load button clicked.")
|
||||||
|
|
||||||
file_manager = self.FileManager(
|
file_manager = self.FileManager(
|
||||||
self.module.model.FILE_EXTENSION, parent=self.widget
|
self.module.model.FILE_EXTENSION, parent=self
|
||||||
)
|
)
|
||||||
file_name = file_manager.loadFileDialog()
|
file_name = file_manager.loadFileDialog()
|
||||||
if file_name:
|
if file_name:
|
||||||
|
@ -468,7 +468,9 @@ class MeasurementView(ModuleView):
|
||||||
|
|
||||||
class MeasurementEdit(QDialog):
|
class MeasurementEdit(QDialog):
|
||||||
"""This dialog is displayed when the measurement edit button is clicked.
|
"""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:
|
def __init__(self, measurement, parent=None) -> None:
|
||||||
"""Initialize the dialog."""
|
"""Initialize the dialog."""
|
||||||
|
|
Loading…
Reference in a new issue