diff --git a/src/nqrduck_measurement/controller.py b/src/nqrduck_measurement/controller.py index 16b2c3c..0968fc2 100644 --- a/src/nqrduck_measurement/controller.py +++ b/src/nqrduck_measurement/controller.py @@ -2,11 +2,8 @@ import logging import json -import numpy as np -from decimal import Decimal from PyQt6.QtCore import pyqtSlot, pyqtSignal from PyQt6.QtWidgets import QApplication -from nqrduck_spectrometer.pulsesequence import PulseSequence from .signalprocessing_options import Apodization from nqrduck.module.module_controller import ModuleController from nqrduck_spectrometer.measurement import Measurement @@ -25,6 +22,10 @@ class MeasurementController(ModuleController): Attributes: set_frequency_failure (pyqtSignal): Signal emitted when setting the frequency fails. set_averages_failure (pyqtSignal): Signal emitted when setting the averages fails. + + Signals: + set_frequency_failure: Signal emitted when setting the frequency fails. + set_averages_failure: Signal emitted when setting the averages fails. """ set_frequency_failure = pyqtSignal() @@ -156,7 +157,7 @@ class MeasurementController(ModuleController): self.set_averages_failure.emit() elif key == "active_spectrometer_changed": self.module.view._ui_form.spectrometerLabel.setText( - "Spectrometer: %s" % value + f"Spectrometer: {value}" ) def save_measurement(self, file_name: str) -> None: diff --git a/src/nqrduck_measurement/model.py b/src/nqrduck_measurement/model.py index 937200b..efa8e2c 100644 --- a/src/nqrduck_measurement/model.py +++ b/src/nqrduck_measurement/model.py @@ -33,6 +33,14 @@ class MeasurementModel(ModuleModel): validator_measurement_frequency (DuckFloatValidator): Validator for the measurement frequency. validator_averages (DuckIntValidator): Validator for the number of averages. + + Signals: + displayed_measurement_changed: Signal emitted when the displayed measurement changes. + measurements_changed: Signal emitted when the list of measurements changes. + view_mode_changed: Signal emitted when the view mode changes. + + measurement_frequency_changed: Signal emitted when the measurement frequency changes. + averages_changed: Signal emitted when the number of averages changes. """ FILE_EXTENSION = "meas" diff --git a/src/nqrduck_measurement/signalprocessing_options.py b/src/nqrduck_measurement/signalprocessing_options.py index be25fc0..eac33fd 100644 --- a/src/nqrduck_measurement/signalprocessing_options.py +++ b/src/nqrduck_measurement/signalprocessing_options.py @@ -1,7 +1,6 @@ """Signal processing options.""" -import logging -from decimal import Decimal -import numpy as np + +import logging import sympy from nqrduck_spectrometer.measurement import Measurement from nqrduck.helpers.functions import Function, GaussianFunction, CustomFunction @@ -9,6 +8,7 @@ from nqrduck.helpers.formbuilder import DuckFormBuilder, DuckFormFunctionSelecti logger = logging.getLogger(__name__) + class FIDFunction(Function): """The exponetial FID function.""" @@ -45,7 +45,12 @@ class Apodization(DuckFormBuilder): self.duration = (self.measurement.tdx[-1] - self.measurement.tdx[0]) * 1e-6 function_selection_field = DuckFormFunctionSelectionField( - text=None, tooltip=None, functions=functions, duration=self.duration, parent=parent, default_function=0 + text=None, + tooltip=None, + functions=functions, + duration=self.duration, + parent=parent, + default_function=0, ) self.add_field(function_selection_field) @@ -57,4 +62,3 @@ class Apodization(DuckFormBuilder): Function: The selected function. """ return self.get_values()[0] - \ No newline at end of file diff --git a/src/nqrduck_measurement/view.py b/src/nqrduck_measurement/view.py index d0330ba..bd05245 100644 --- a/src/nqrduck_measurement/view.py +++ b/src/nqrduck_measurement/view.py @@ -38,7 +38,7 @@ class MeasurementView(ModuleView): # Initialize plotter self.init_plotter() logger.debug( - "Facecolor %s" % str(self._ui_form.plotter.canvas.ax.get_facecolor()) + f"Facecolor {str(self._ui_form.plotter.canvas.ax.get_facecolor())}" ) # Measurement dialog