From d11d15a50944e92b11e267de0a1e1997d73bae5d Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 13:28:26 +0200 Subject: [PATCH 01/30] simplify plotting --- linien-common/linien_common/common.py | 10 ++++-- linien-gui/linien_gui/ui/plot_widget.py | 44 ++++++++++++------------- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/linien-common/linien_common/common.py b/linien-common/linien_common/common.py index c9157f82..a1044174 100644 --- a/linien-common/linien_common/common.py +++ b/linien-common/linien_common/common.py @@ -20,7 +20,7 @@ from enum import IntEnum from time import time -from typing import Dict, List, Tuple, Union +from typing import Dict, Iterable, List, Tuple, Union import numpy as np from scipy.signal import correlate, resample @@ -278,8 +278,12 @@ def convert_channel_mixing_value(value: int) -> Tuple[int, int]: def combine_error_signal( - error_signals, dual_channel, channel_mixing, combined_offset, chain_factor_width=8 -): + error_signals: tuple[Iterable[int], Iterable[int]], + dual_channel: bool, + channel_mixing: int, + combined_offset: int, + chain_factor_width: int = 8, +) -> np.ndarray: if not dual_channel: signal = error_signals[0] else: diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index e8fdcb7a..a6ef4d66 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -236,7 +236,7 @@ def on_plot_settings_changed(*args): self.control_signal_history_data = self.parameters.control_signal_history.value self.monitor_signal_history_data = self.parameters.monitor_signal_history.value - self.parameters.to_plot.add_callback(self.replot) + self.parameters.to_plot.add_callback(self.on_new_plot_data_received) def on_autolock_selection_changed(value): if value: @@ -391,10 +391,13 @@ def mouseReleaseEvent(self, event): ) self.autolock_ref_spectrum = rolled_error_signal elif self.parameters.optimization_selection.value: - dual_channel = self.parameters.dual_channel.value channel = self.parameters.optimization_channel.value spectrum = self.last_plot_data[ - 0 if not dual_channel else (0, 1)[channel] + ( + 0 + if not self.parameters.dual_channel.value + else (0, 1)[channel] + ) ] self.parameters.optimization_selection.value = False points = sorted([int(x0), int(x)]) @@ -403,7 +406,7 @@ def mouseReleaseEvent(self, event): self.overlay.setVisible(False) self.touch_start = None - def replot(self, to_plot): + def on_new_plot_data_received(self, to_plot): time_beginning = time() if self._should_reposition_reset_view_button: @@ -470,17 +473,24 @@ def replot(self, to_plot): ) all_signals = (error_signal, control_signal, history, slow_history) - self.plot_data_locked(to_plot) + self.combined_signal.setData( + list(range(len(to_plot["error_signal"]))), + to_plot["error_signal"] / V, + ) + self.control_signal.setData( + list(range(len(to_plot["control_signal"]))), + to_plot["control_signal"] / V, + ) self.plot_autolock_target_line(None) else: dual_channel = self.parameters.dual_channel.value - self.signal1.setVisible(True) + self.signal1.setVisible(dual_channel) monitor_signal = to_plot.get("monitor_signal") error_signal_2 = to_plot.get("error_signal_2") self.signal2.setVisible( error_signal_2 is not None or monitor_signal is not None ) - self.combined_signal.setVisible(dual_channel) + self.combined_signal.setVisible(True) self.control_signal.setVisible(False) self.control_signal_history.setVisible(False) self.slow_history.setVisible(False) @@ -505,7 +515,11 @@ def replot(self, to_plot): all_signals = [s1, s2] + [combined_error_signal] self.last_plot_data = all_signals - self.plot_data_unlocked((s1, s2), combined_error_signal) + self.signal2.setData(list(range(len(s2))), s2 / V) + self.signal1.setData(list(range(len(s1))), s1 / V) + self.combined_signal.setData( + list(range(len(combined_error_signal))), combined_error_signal / V + ) self.plot_autolock_target_line(combined_error_signal) if (self.parameters.modulation_frequency.value != 0) and ( @@ -618,20 +632,6 @@ def plot_signal_strength( neg_signal.setData(x, lower, pen=invisible_pen) return np.max([np.max(upper), -1 * np.min(lower)]) * V - def plot_data_unlocked(self, error_signals, combined_signal): - error_signal1, error_signal2 = error_signals - self.signal1.setData(list(range(len(error_signal1))), error_signal1 / V) - self.signal2.setData(list(range(len(error_signal2))), error_signal2 / V) - self.combined_signal.setData( - list(range(len(combined_signal))), combined_signal / V - ) - - def plot_data_locked(self, signals): - error_signal = signals["error_signal"] - control_signal = signals["control_signal"] - self.combined_signal.setData(list(range(len(error_signal))), error_signal / V) - self.control_signal.setData(list(range(len(error_signal))), control_signal / V) - def plot_autolock_target_line(self, combined_error_signal): if ( self.autolock_ref_spectrum is not None From 0082c897d22cada30d960c2af3540617e16d8416 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 14:15:00 +0200 Subject: [PATCH 02/30] simplify plotting further --- linien-gui/linien_gui/ui/plot_widget.py | 262 +++++++++++------------- 1 file changed, 123 insertions(+), 139 deletions(-) diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index a6ef4d66..0302a159 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -73,14 +73,10 @@ def on_connection_established(self): QtCore.QTimer.singleShot(100, self.listen_to_parameter_changes) def listen_to_parameter_changes(self): - self.parent.parameters.sweep_center.add_callback(self.repaint_tick_strings) - self.parent.parameters.sweep_amplitude.add_callback(self.repaint_tick_strings) - self.parent.parameters.lock.add_callback(self.repaint_tick_strings) - self.repaint_tick_strings() - - def repaint_tick_strings(self, *args): - self.picture = None - self.update() + self.parent.parameters.sweep_center.add_callback(self.on_lock_changed) + self.parent.parameters.sweep_amplitude.add_callback(self.on_lock_changed) + self.parent.parameters.lock.add_callback(self.on_lock_changed) + self.on_lock_changed() def tickStrings(self, values, scale, spacing) -> list[str]: if self.parent.parameters.lock.value: @@ -99,6 +95,10 @@ def tickStrings(self, values, scale, spacing) -> list[str]: precision_specifier = 2 return [f"{v:.{precision_specifier}f}" for v in values] + def on_lock_changed(self, *args) -> None: + self.picture = None + self.update() + class PlotWidget(pg.PlotWidget): signal_power1 = pyqtSignal(float) @@ -121,7 +121,13 @@ def __init__(self, *args, **kwargs): # PlotItem self.hideButtons() # we have our own "reset view" button instead - self.init_reset_view_button() + self.reset_view_button = QtWidgets.QPushButton(self) + self.reset_view_button.setText("Reset view") + self.reset_view_button.setStyleSheet("padding: 10px; font-weight: bold") + icon = QtGui.QIcon.fromTheme("view-restore") + self.reset_view_button.setIcon(icon) + self.reset_view_button.clicked.connect(self.reset_view) + self.position_reset_view_button() # copied from https://github.com/pyqtgraph/pyqtgraph/blob/master/pyqtgraph/graphicsItems/PlotItem/PlotItem.py#L133 # noqa: E501 # whenever something changes, we check whether to show "auto scale" button @@ -192,9 +198,24 @@ def __init__(self, *args, **kwargs): self.selection_running = False self.selection_boundaries = None - self.init_overlays() - self.init_lock_target_line() + self.overlay = pg.LinearRegionItem(values=(0, 0), movable=False) + self.overlay.setVisible(False) + self.addItem(self.overlay) + self.boundary_overlays = [ + pg.LinearRegionItem(values=(0, 0), movable=False, brush=(0, 0, 0, 200)) + for _ in range(2) + ] + for i, overlay in enumerate(self.boundary_overlays): + overlay.setVisible(False) + # make outer borders invisible, see + # https://github.com/pyqtgraph/pyqtgraph/issues/462 + overlay.lines[i].setPen((0, 0, 0, 0)) + self.addItem(overlay) + + self.lock_target_line = pg.InfiniteLine(movable=False) + self.lock_target_line.setValue(1000) + self.addItem(self.lock_target_line) self._fixed_opengl_bug = False self.last_plot_time = 0 @@ -208,78 +229,47 @@ def on_connection_established(self): self.parameters = self.app.parameters self.control = self.app.control - def on_plot_settings_changed(*args): - pen_width = self.app.settings.plot_line_width.value - - for curve, color in { - self.signal1: Color.SPECTRUM1, - self.signal2: Color.SPECTRUM2, - self.combined_signal: Color.SPECTRUM_COMBINED, - self.control_signal: Color.CONTROL_SIGNAL, - self.control_signal_history: Color.CONTROL_SIGNAL_HISTORY, - self.slow_history: Color.SLOW_HISTORY, - self.monitor_signal_history: Color.MONITOR_SIGNAL_HISTORY, - }.items(): - r, g, b, _ = getattr( - self.app.settings, f"plot_color_{color.value}" - ).value - a = self.app.settings.plot_line_opacity.value - curve.setPen(pg.mkPen((r, g, b, a), width=pen_width)) - for color_idx in range(N_COLORS): getattr(self.app.settings, f"plot_color_{color_idx}").add_callback( - on_plot_settings_changed + self.on_plot_settings_changed ) - self.app.settings.plot_line_width.add_callback(on_plot_settings_changed) - self.app.settings.plot_line_opacity.add_callback(on_plot_settings_changed) + self.app.settings.plot_line_width.add_callback(self.on_plot_settings_changed) + self.app.settings.plot_line_opacity.add_callback(self.on_plot_settings_changed) self.control_signal_history_data = self.parameters.control_signal_history.value self.monitor_signal_history_data = self.parameters.monitor_signal_history.value self.parameters.to_plot.add_callback(self.on_new_plot_data_received) - - def on_autolock_selection_changed(value): - if value: - self.parameters.optimization_selection.value = False - self.enable_area_selection(selectable_width=0.99) - self.pause_plot_and_cache_data() - elif not self.parameters.optimization_selection.value: - self.disable_area_selection() - self.resume_plot_and_clear_cache() - - self.parameters.autolock_selection.add_callback(on_autolock_selection_changed) - - def on_optimization_selection_changed(value): - if value: - self.parameters.autolock_selection.value = False - self.enable_area_selection(selectable_width=0.75) - self.pause_plot_and_cache_data() - elif not self.parameters.autolock_selection.value: - self.disable_area_selection() - self.resume_plot_and_clear_cache() - + self.parameters.autolock_selection.add_callback( + self.on_autolock_selection_changed + ) self.parameters.optimization_selection.add_callback( - on_optimization_selection_changed + self.on_optimization_selection_changed ) - - def show_or_hide_crosshair(automatic_mode: bool) -> None: - self.crosshair.setVisible(not automatic_mode) - - self.parameters.automatic_mode.add_callback(show_or_hide_crosshair) - - def set_xaxis_label(lock: bool) -> None: - if not lock: - self.setLabel("bottom", "sweep voltage", units="V") - else: - self.setLabel("bottom", "time", units="µs") - - self.parameters.lock.add_callback(set_xaxis_label) + self.parameters.automatic_mode.add_callback(self.on_automatic_mode_changed) + self.parameters.lock.add_callback(self.on_lock_changed) def _to_data_coords(self, event): pos = self.plotItem.vb.mapSceneToView(event.pos()) x, y = pos.x(), pos.y() return x, y + def _within_boundaries(self, x): + boundaries = ( + self.selection_boundaries if self.selection_running else [0, N_POINTS] + ) + + if x < boundaries[0]: + return boundaries[0] + if x > boundaries[1]: + return boundaries[1] + return x + + def keyPressEvent(self, event): + # we listen here in addition to the main window because some events are only + # caught here + self.keyPressed.emit(event.key()) + def mouseMoveEvent(self, event): if not self.selection_running: super().mouseMoveEvent(event) @@ -293,62 +283,6 @@ def mouseMoveEvent(self, event): x = self._within_boundaries(x) self.set_selection_overlay(x0, x - x0) - def init_overlays(self): - self.overlay = pg.LinearRegionItem(values=(0, 0), movable=False) - self.overlay.setVisible(False) - self.addItem(self.overlay) - - self.boundary_overlays = [ - pg.LinearRegionItem( - values=(0, 0), - movable=False, - brush=(0, 0, 0, 200), - ) - for i in range(2) - ] - for i, overlay in enumerate(self.boundary_overlays): - overlay.setVisible(False) - # make outer borders invisible, see - # https://github.com/pyqtgraph/pyqtgraph/issues/462 - overlay.lines[i].setPen((0, 0, 0, 0)) - self.addItem(overlay) - - def init_lock_target_line(self): - self.lock_target_line = pg.InfiniteLine(movable=False) - self.lock_target_line.setValue(1000) - self.addItem(self.lock_target_line) - - def set_selection_overlay(self, x_start, width): - self.overlay.setRegion((x_start, x_start + width)) - - def mousePressEvent(self, event): - super().mousePressEvent(event) - - if self.selection_running: - if event.button() == QtCore.Qt.RightButton: - return - - x, y = self._to_data_coords(event) - - if self.selection_running: - if x < self.selection_boundaries[0] or x > self.selection_boundaries[1]: - return - - self.touch_start = x, y - self.set_selection_overlay(x, 0) - self.overlay.setVisible(True) - - def _within_boundaries(self, x): - boundaries = ( - self.selection_boundaries if self.selection_running else [0, N_POINTS] - ) - - if x < boundaries[0]: - return boundaries[0] - if x > boundaries[1]: - return boundaries[1] - return x - def mouseReleaseEvent(self, event): super().mouseReleaseEvent(event) @@ -406,6 +340,70 @@ def mouseReleaseEvent(self, event): self.overlay.setVisible(False) self.touch_start = None + def on_plot_settings_changed(self, *args): + pen_width = self.app.settings.plot_line_width.value + + for curve, color in { + self.signal1: Color.SPECTRUM1, + self.signal2: Color.SPECTRUM2, + self.combined_signal: Color.SPECTRUM_COMBINED, + self.control_signal: Color.CONTROL_SIGNAL, + self.control_signal_history: Color.CONTROL_SIGNAL_HISTORY, + self.slow_history: Color.SLOW_HISTORY, + self.monitor_signal_history: Color.MONITOR_SIGNAL_HISTORY, + }.items(): + r, g, b, _ = getattr(self.app.settings, f"plot_color_{color.value}").value + a = self.app.settings.plot_line_opacity.value + curve.setPen(pg.mkPen((r, g, b, a), width=pen_width)) + + def on_autolock_selection_changed(self, value): + if value: + self.parameters.optimization_selection.value = False + self.enable_area_selection(selectable_width=0.99) + self.pause_plot_and_cache_data() + elif not self.parameters.optimization_selection.value: + self.disable_area_selection() + self.resume_plot_and_clear_cache() + + def on_optimization_selection_changed(self, value): + if value: + self.parameters.autolock_selection.value = False + self.enable_area_selection(selectable_width=0.75) + self.pause_plot_and_cache_data() + elif not self.parameters.autolock_selection.value: + self.disable_area_selection() + self.resume_plot_and_clear_cache() + + def on_automatic_mode_changed(self, automatic_mode: bool) -> None: + """Show or hide crosshair""" + self.crosshair.setVisible(not automatic_mode) + + def on_lock_changed(self, lock: bool) -> None: + if not lock: + self.setLabel("bottom", "sweep voltage", units="V") + else: + self.setLabel("bottom", "time", units="µs") + + def set_selection_overlay(self, x_start, width): + self.overlay.setRegion((x_start, x_start + width)) + + def mousePressEvent(self, event): + super().mousePressEvent(event) + + if self.selection_running: + if event.button() == QtCore.Qt.RightButton: + return + + x, y = self._to_data_coords(event) + + if self.selection_running: + if x < self.selection_boundaries[0] or x > self.selection_boundaries[1]: + return + + self.touch_start = x, y + self.set_selection_overlay(x, 0) + self.overlay.setVisible(True) + def on_new_plot_data_received(self, to_plot): time_beginning = time() @@ -484,13 +482,13 @@ def on_new_plot_data_received(self, to_plot): self.plot_autolock_target_line(None) else: dual_channel = self.parameters.dual_channel.value - self.signal1.setVisible(dual_channel) + self.signal1.setVisible(True) monitor_signal = to_plot.get("monitor_signal") error_signal_2 = to_plot.get("error_signal_2") self.signal2.setVisible( error_signal_2 is not None or monitor_signal is not None ) - self.combined_signal.setVisible(True) + self.combined_signal.setVisible(dual_channel) self.control_signal.setVisible(False) self.control_signal_history.setVisible(False) self.slow_history.setVisible(False) @@ -661,11 +659,6 @@ def plot_autolock_target_line(self, combined_error_signal): else: self.lock_target_line.setVisible(False) - def keyPressEvent(self, event): - # we listen here in addition to the main window because some events are only - # caught here - self.keyPressed.emit(event.key()) - def update_signal_history(self, to_plot): update_signal_history( self.control_signal_history_data, @@ -741,15 +734,6 @@ def resume_plot_and_clear_cache(self): self._plot_paused = False self._cached_plot_data = [] - def init_reset_view_button(self): - self.reset_view_button = QtWidgets.QPushButton(self) - self.reset_view_button.setText("Reset view") - self.reset_view_button.setStyleSheet("padding: 10px; font-weight: bold") - icon = QtGui.QIcon.fromTheme("view-restore") - self.reset_view_button.setIcon(icon) - self.reset_view_button.clicked.connect(self.reset_view) - self.position_reset_view_button() - # called when widget is resized def position_reset_view_button(self): pos = QtCore.QPoint( From fd1503dc62fa8cb14f2e058221f4f30539df65d5 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 14:40:41 +0200 Subject: [PATCH 03/30] change Qt element names --- linien-gui/linien_gui/ui/main_window.py | 66 +++++++++++++------------ linien-gui/linien_gui/ui/main_window.ui | 52 +++++++++---------- linien-gui/linien_gui/ui/right_panel.py | 8 +-- 3 files changed, 64 insertions(+), 62 deletions(-) diff --git a/linien-gui/linien_gui/ui/main_window.py b/linien-gui/linien_gui/ui/main_window.py index 5ca799a2..62225d25 100644 --- a/linien-gui/linien_gui/ui/main_window.py +++ b/linien-gui/linien_gui/ui/main_window.py @@ -50,28 +50,28 @@ class MainWindow(QtWidgets.QMainWindow): power_channel_1: QtWidgets.QLabel power_channel_2: QtWidgets.QLabel legend_unlocked: QtWidgets.QHBoxLayout - legend_spectrum_1: QtWidgets.QLabel - legend_spectrum_2: QtWidgets.QLabel - legend_spectrum_combined: QtWidgets.QLabel + spectrum1LegendLabel: QtWidgets.QLabel + spectrum2LegendLabel: QtWidgets.QLabel + combinedSpectrumLegendLabel: QtWidgets.QLabel sweepControlWidget: SweepControlWidget sweepAmplitudeSpinBox: CustomDoubleSpinBox sweepCenterSpinBox: CustomDoubleSpinBox sweepSlider: SweepSlider sweepStartStopPushButton: QtWidgets.QPushButton - top_lock_panel: QtWidgets.QWidget - control_std: QtWidgets.QLabel - error_std: QtWidgets.QLabel - legend_control_signal: QtWidgets.QLabel - legend_control_signal_history: QtWidgets.QLabel - legend_error_signal: QtWidgets.QLabel - legend_monitor_signal_history: QtWidgets.QLabel - legend_slow_signal_history: QtWidgets.QLabel + topLockPanelWidget: QtWidgets.QWidget + controlStdLabel: QtWidgets.QLabel + errorStdLabel: QtWidgets.QLabel + controlSignalLegendLabel: QtWidgets.QLabel + controlSignalHistoryLegendLabel: QtWidgets.QLabel + errorSignalLegendLabel: QtWidgets.QLabel + monitorSignalHistoryLegendLabel: QtWidgets.QLabel + slowSignalHistoryLegendLabel: QtWidgets.QLabel rightPanel: RightPanel exportParametersButton: QtWidgets.QPushButton importParametersButton: QtWidgets.QPushButton newVersionAvailableLabel: QtWidgets.QLabel - pid_parameter_optimization_button: QtWidgets.QPushButton - settings_toolbox: QtWidgets.QToolBox + PIDParameterOptimizationButton: QtWidgets.QPushButton + settingsToolbox: QtWidgets.QToolBox generalPanel: QtWidgets.QWidget modSpectroscopyPanel: QtWidgets.QWidget optimizationPanel: QtWidgets.QWidget @@ -134,19 +134,19 @@ def on_connection_established(self): self.parameters.to_plot.add_callback(self.update_std) self.parameters.pid_on_slow_enabled.add_callback( - lambda v: self.legend_slow_signal_history.setVisible(v) + lambda v: self.slowSignalHistoryLegendLabel.setVisible(v) ) self.parameters.dual_channel.add_callback( - lambda v: self.legend_monitor_signal_history.setVisible(not v) + lambda v: self.monitorSignalHistoryLegendLabel.setVisible(not v) ) - self.settings_toolbox.setCurrentIndex(0) + self.settingsToolbox.setCurrentIndex(0) self.parameters.lock.add_callback(lambda *args: self.reset_std_history()) for color_idx in range(N_COLORS): getattr(self.app.settings, f"plot_color_{color_idx}").add_callback( - self.update_legend_color + self.on_plot_color_changed ) self.parameters.dual_channel.add_callback(self.update_legend_text) @@ -159,12 +159,12 @@ def change_sweep_control_visibility(self, *args): self.sweepControlWidget.setVisible( not al_running and not locked and not optimization ) - self.top_lock_panel.setVisible(locked) + self.topLockPanelWidget.setVisible(locked) self.statusbar_unlocked.setVisible( not al_running and not locked and not optimization ) - def update_legend_color(self, *args): + def on_plot_color_changed(self, *args): def set_color(el, color: Color): return el.setStyleSheet( "color: " @@ -173,23 +173,23 @@ def set_color(el, color: Color): ) ) - set_color(self.legend_spectrum_1, Color.SPECTRUM1) - set_color(self.legend_spectrum_2, Color.SPECTRUM2) - set_color(self.legend_spectrum_combined, Color.SPECTRUM_COMBINED) - set_color(self.legend_error_signal, Color.SPECTRUM_COMBINED) - set_color(self.legend_control_signal, Color.CONTROL_SIGNAL) - set_color(self.legend_control_signal_history, Color.CONTROL_SIGNAL_HISTORY) - set_color(self.legend_slow_signal_history, Color.SLOW_HISTORY) - set_color(self.legend_monitor_signal_history, Color.MONITOR_SIGNAL_HISTORY) + set_color(self.spectrum1LegendLabel, Color.SPECTRUM1) + set_color(self.spectrum2LgendLabel, Color.SPECTRUM2) + set_color(self.combinedSpectrumLegendLabel, Color.SPECTRUM_COMBINED) + set_color(self.errorSignalLegendLabel, Color.SPECTRUM_COMBINED) + set_color(self.controlSignalLegendLabel, Color.CONTROL_SIGNAL) + set_color(self.controlSignalHistoryLegendLabel, Color.CONTROL_SIGNAL_HISTORY) + set_color(self.slowSignalHistoryLegendLabel, Color.SLOW_HISTORY) + set_color(self.monitorSignalHistoryLegendLabel, Color.MONITOR_SIGNAL_HISTORY) def update_legend_text(self, dual_channel): - self.legend_spectrum_1.setText( + self.spectrum1LegendLabel.setText( "error signal" if not dual_channel else "error signal 1" ) - self.legend_spectrum_2.setText( + self.spectrum2LgendLabel.setText( "monitor" if not dual_channel else "error signal 2" ) - self.legend_spectrum_combined.setVisible(dual_channel) + self.combinedSpectrumLegendLabel.setVisible(dual_channel) def show(self, host: str, name: str) -> None: # type: ignore[override] self.setWindowTitle( @@ -270,8 +270,10 @@ def update_std(self, to_plot, max_std_history_length=10): ] if error_signal is not None and control_signal is not None: - self.error_std.setText(f"{np.mean(self.error_std_history):.2f}") - self.control_std.setText(f"{np.mean(self.control_std_history):.2f}") + self.errorStdLabel.setText(f"{np.mean(self.error_std_history):.2f}") + self.controlStdLabel.setText( + f"{np.mean(self.control_std_history):.2f}" + ) def reset_std_history(self): self.error_std_history = [] diff --git a/linien-gui/linien_gui/ui/main_window.ui b/linien-gui/linien_gui/ui/main_window.ui index 24cb6eda..010c2e2f 100644 --- a/linien-gui/linien_gui/ui/main_window.ui +++ b/linien-gui/linien_gui/ui/main_window.ui @@ -236,7 +236,7 @@ p, li { white-space: pre-wrap; } - + @@ -252,7 +252,7 @@ p, li { white-space: pre-wrap; } - + TextLabel @@ -288,7 +288,7 @@ p, li { white-space: pre-wrap; } - + TextLabel @@ -311,7 +311,7 @@ p, li { white-space: pre-wrap; } - + error @@ -321,7 +321,7 @@ p, li { white-space: pre-wrap; } - + control @@ -331,7 +331,7 @@ p, li { white-space: pre-wrap; } - + control history @@ -341,14 +341,14 @@ p, li { white-space: pre-wrap; } - + slow out history - + monitor signal @@ -469,9 +469,9 @@ p, li { white-space: pre-wrap; } - + - + sig1 @@ -481,7 +481,7 @@ p, li { white-space: pre-wrap; } - + sig2 @@ -491,7 +491,7 @@ p, li { white-space: pre-wrap; } - + combined @@ -592,7 +592,7 @@ p, li { white-space: pre-wrap; } - + Noise analysis @@ -1027,7 +1027,7 @@ p, li { white-space: pre-wrap; } - + true @@ -1054,8 +1054,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 @@ -1072,8 +1072,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 @@ -1090,8 +1090,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 @@ -1108,8 +1108,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 @@ -1131,8 +1131,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 @@ -1155,8 +1155,8 @@ p, li { white-space: pre-wrap; } 0 0 - 332 - 400 + 338 + 488 diff --git a/linien-gui/linien_gui/ui/right_panel.py b/linien-gui/linien_gui/ui/right_panel.py index 4dc4f707..d66f132c 100644 --- a/linien-gui/linien_gui/ui/right_panel.py +++ b/linien-gui/linien_gui/ui/right_panel.py @@ -34,7 +34,7 @@ def ready(self) -> None: self.main_window.openDeviceManagerButton.clicked.connect( self.open_device_manager ) - self.main_window.pid_parameter_optimization_button.clicked.connect( + self.main_window.PIDParameterOptimizationButton.clicked.connect( self.open_psd_window ) @@ -49,7 +49,7 @@ def on_connection_established(self) -> None: self.parameters.lock.add_callback(self.enable_or_disable_panels) def highlight_psd_button(locked: bool) -> None: - self.main_window.pid_parameter_optimization_button.setStyleSheet( + self.main_window.PIDParameterOptimizationButton.setStyleSheet( "background: #00aa00;" if locked else "" ) @@ -66,7 +66,7 @@ def open_device_manager(self) -> None: def autolock_status_changed(self, value: bool) -> None: if value: - self.main_window.settings_toolbox.setCurrentWidget( + self.main_window.settingsToolbox.setCurrentWidget( self.main_window.lockingPanel ) @@ -74,7 +74,7 @@ def autolock_status_changed(self, value: bool) -> None: def optimization_status_changed(self, value: bool) -> None: if value: - self.main_window.settings_toolbox.setCurrentWidget( + self.main_window.settingsToolbox.setCurrentWidget( self.main_window.optimizationPanel ) From d7f8b8cda06da357bf861e1c4ac4063578067955 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 15:08:14 +0200 Subject: [PATCH 04/30] use Qt-style names for plot items --- linien-gui/linien_gui/ui/plot_widget.py | 205 ++++++++++++------------ 1 file changed, 103 insertions(+), 102 deletions(-) diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index 0302a159..ecbb5e19 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -148,44 +148,44 @@ def __init__(self, *args, **kwargs): self.crosshair = pg.InfiniteLine(pos=N_POINTS / 2, pen=pg.mkPen("w", width=1)) self.addItem(self.crosshair) - self.zero_line = pg.PlotCurveItem(pen=pg.mkPen("w", width=1)) - self.addItem(self.zero_line) - self.signal_strength_a = pg.PlotCurveItem() - self.addItem(self.signal_strength_a) - self.signal_strength_a2 = pg.PlotCurveItem() - self.addItem(self.signal_strength_a2) - self.signal_strength_a_fill = pg.FillBetweenItem( - self.signal_strength_a, self.signal_strength_a2 + self.zeroLine = pg.PlotCurveItem(pen=pg.mkPen("w", width=1)) + self.addItem(self.zeroLine) + self.signalStrengthA = pg.PlotCurveItem() + self.addItem(self.signalStrengthA) + self.signalStrengthA2 = pg.PlotCurveItem() + self.addItem(self.signalStrengthA2) + self.signalStrengthAFill = pg.FillBetweenItem( + self.signalStrengthA, self.signalStrengthA2 ) - self.addItem(self.signal_strength_a_fill) - self.signal_strength_b = pg.PlotCurveItem() - self.addItem(self.signal_strength_b) - self.signal_strength_b2 = pg.PlotCurveItem() - self.addItem(self.signal_strength_b2) - self.signal_strength_b_fill = pg.FillBetweenItem( - self.signal_strength_b, self.signal_strength_b2 + self.addItem(self.signalStrengthAFill) + self.signalStrengthB = pg.PlotCurveItem() + self.addItem(self.signalStrengthB) + self.signalStrengthB2 = pg.PlotCurveItem() + self.addItem(self.signalStrengthB2) + self.signalStrengthBFill = pg.FillBetweenItem( + self.signalStrengthB, self.signalStrengthB2 ) - self.addItem(self.signal_strength_b_fill) - self.signal1 = pg.PlotCurveItem() - self.addItem(self.signal1) - self.signal2 = pg.PlotCurveItem() - self.addItem(self.signal2) - self.combined_signal = pg.PlotCurveItem() - self.addItem(self.combined_signal) - - self.control_signal = pg.PlotCurveItem() - self.addItem(self.control_signal) - self.control_signal_history = pg.PlotCurveItem() - self.addItem(self.control_signal_history) - self.slow_history = pg.PlotCurveItem() - self.addItem(self.slow_history) - self.monitor_signal_history = pg.PlotCurveItem() - self.addItem(self.monitor_signal_history) - - self.zero_line.setData([0, N_POINTS - 1], [0, 0]) - self.signal1.setData([0, N_POINTS - 1], [1, 1]) - self.signal1.setData([0, N_POINTS - 1], [1, 1]) - self.combined_signal.setData([0, N_POINTS - 1], [1, 1]) + self.addItem(self.signalStrengthBFill) + self.errorSignal1 = pg.PlotCurveItem() + self.addItem(self.errorSignal1) + self.monitorOrErrorSignal2 = pg.PlotCurveItem() + self.addItem(self.monitorOrErrorSignal2) + self.combinedErrorSignal = pg.PlotCurveItem() + self.addItem(self.combinedErrorSignal) + + self.controlSignal = pg.PlotCurveItem() + self.addItem(self.controlSignal) + self.controlSignalHistory = pg.PlotCurveItem() + self.addItem(self.controlSignalHistory) + self.slowHistory = pg.PlotCurveItem() + self.addItem(self.slowHistory) + self.monitorSignalHistory = pg.PlotCurveItem() + self.addItem(self.monitorSignalHistory) + + self.zeroLine.setData([0, N_POINTS - 1], [0, 0]) + self.errorSignal1.setData([0, N_POINTS - 1], [1, 1]) + self.errorSignal1.setData([0, N_POINTS - 1], [1, 1]) + self.combinedErrorSignal.setData([0, N_POINTS - 1], [1, 1]) self.connection = None self.parameters = None @@ -344,13 +344,13 @@ def on_plot_settings_changed(self, *args): pen_width = self.app.settings.plot_line_width.value for curve, color in { - self.signal1: Color.SPECTRUM1, - self.signal2: Color.SPECTRUM2, - self.combined_signal: Color.SPECTRUM_COMBINED, - self.control_signal: Color.CONTROL_SIGNAL, - self.control_signal_history: Color.CONTROL_SIGNAL_HISTORY, - self.slow_history: Color.SLOW_HISTORY, - self.monitor_signal_history: Color.MONITOR_SIGNAL_HISTORY, + self.errorSignal1: Color.SPECTRUM1, + self.monitorOrErrorSignal2: Color.SPECTRUM2, + self.combinedErrorSignal: Color.SPECTRUM_COMBINED, + self.controlSignal: Color.CONTROL_SIGNAL, + self.controlSignalHistory: Color.CONTROL_SIGNAL_HISTORY, + self.slowHistory: Color.SLOW_HISTORY, + self.monitorSignalHistory: Color.MONITOR_SIGNAL_HISTORY, }.items(): r, g, b, _ = getattr(self.app.settings, f"plot_color_{color.value}").value a = self.app.settings.plot_line_opacity.value @@ -446,53 +446,55 @@ def on_new_plot_data_received(self, to_plot): # we also call this if the laser is not locked because it resets the history # in this case - history, slow_history = self.update_signal_history(to_plot) + history, slow_history = self.update_or_reset_signal_history(to_plot) if self.parameters.lock.value: - self.signal1.setVisible(False) - self.signal2.setVisible(False) - self.control_signal.setVisible(True) - self.control_signal_history.setVisible(True) - self.slow_history.setVisible(self.parameters.pid_on_slow_enabled.value) - self.monitor_signal_history.setVisible( - not self.parameters.dual_channel.value - ) - self.combined_signal.setVisible(True) - self.signal_strength_a.setVisible(False) - self.signal_strength_b.setVisible(False) - self.signal_strength_a2.setVisible(False) - self.signal_strength_b2.setVisible(False) - self.signal_strength_a_fill.setVisible(False) - self.signal_strength_b_fill.setVisible(False) - - error_signal, control_signal = ( + all_signals = ( to_plot["error_signal"], to_plot["control_signal"], + history, + slow_history, ) - all_signals = (error_signal, control_signal, history, slow_history) - self.combined_signal.setData( + self.errorSignal1.setVisible(False) + self.monitorOrErrorSignal2.setVisible(False) + self.controlSignalHistory.setVisible(True) + self.slowHistory.setVisible(self.parameters.pid_on_slow_enabled.value) + self.monitorSignalHistory.setVisible( + not self.parameters.dual_channel.value + ) + self.signalStrengthA.setVisible(False) + self.signalStrengthB.setVisible(False) + self.signalStrengthA2.setVisible(False) + self.signalStrengthB2.setVisible(False) + self.signalStrengthAFill.setVisible(False) + self.signalStrengthBFill.setVisible(False) + + self.combinedErrorSignal.setVisible(True) + self.combinedErrorSignal.setData( list(range(len(to_plot["error_signal"]))), to_plot["error_signal"] / V, ) - self.control_signal.setData( + + self.controlSignal.setVisible(True) + self.controlSignal.setData( list(range(len(to_plot["control_signal"]))), to_plot["control_signal"] / V, ) self.plot_autolock_target_line(None) else: dual_channel = self.parameters.dual_channel.value - self.signal1.setVisible(True) + self.errorSignal1.setVisible(True) monitor_signal = to_plot.get("monitor_signal") error_signal_2 = to_plot.get("error_signal_2") - self.signal2.setVisible( + self.monitorOrErrorSignal2.setVisible( error_signal_2 is not None or monitor_signal is not None ) - self.combined_signal.setVisible(dual_channel) - self.control_signal.setVisible(False) - self.control_signal_history.setVisible(False) - self.slow_history.setVisible(False) - self.monitor_signal_history.setVisible(False) + self.combinedErrorSignal.setVisible(dual_channel) + self.controlSignal.setVisible(False) + self.controlSignalHistory.setVisible(False) + self.slowHistory.setVisible(False) + self.monitorSignalHistory.setVisible(False) s1 = to_plot["error_signal_1"] s2 = error_signal_2 if error_signal_2 is not None else monitor_signal @@ -513,9 +515,9 @@ def on_new_plot_data_received(self, to_plot): all_signals = [s1, s2] + [combined_error_signal] self.last_plot_data = all_signals - self.signal2.setData(list(range(len(s2))), s2 / V) - self.signal1.setData(list(range(len(s1))), s1 / V) - self.combined_signal.setData( + self.monitorOrErrorSignal2.setData(list(range(len(s2))), s2 / V) + self.errorSignal1.setData(list(range(len(s1))), s1 / V) + self.combinedErrorSignal.setData( list(range(len(combined_error_signal))), combined_error_signal / V ) self.plot_autolock_target_line(combined_error_signal) @@ -527,22 +529,22 @@ def on_new_plot_data_received(self, to_plot): s1q = to_plot.get("error_signal_1_quadrature") s2q = to_plot.get("error_signal_2_quadrature") - self.signal_strength_a.setVisible(s1q is not None) - self.signal_strength_a2.setVisible(s1q is not None) - self.signal_strength_a_fill.setVisible(s1q is not None) + self.signalStrengthA.setVisible(s1q is not None) + self.signalStrengthA2.setVisible(s1q is not None) + self.signalStrengthAFill.setVisible(s1q is not None) - self.signal_strength_b.setVisible(s2q is not None) - self.signal_strength_b2.setVisible(s2q is not None) - self.signal_strength_b_fill.setVisible(s2q is not None) + self.signalStrengthB.setVisible(s2q is not None) + self.signalStrengthB2.setVisible(s2q is not None) + self.signalStrengthBFill.setVisible(s2q is not None) if s1q is not None: max_signal_strength_V = ( self.plot_signal_strength( s1, s1q, - self.signal_strength_a, - self.signal_strength_a2, - self.signal_strength_a_fill, + self.signalStrengthA, + self.signalStrengthA2, + self.signalStrengthAFill, self.parameters.offset_a.value, self.app.settings.plot_color_0.value, ) @@ -566,9 +568,9 @@ def on_new_plot_data_received(self, to_plot): self.plot_signal_strength( s2, s2q, - self.signal_strength_b, - self.signal_strength_b2, - self.signal_strength_b_fill, + self.signalStrengthB, + self.signalStrengthB2, + self.signalStrengthBFill, self.parameters.offset_b.value, self.app.settings.plot_color_1.value, ) @@ -588,12 +590,12 @@ def on_new_plot_data_received(self, to_plot): else: self.signal_power2.emit(INVALID_POWER) else: - self.signal_strength_a.setVisible(False) - self.signal_strength_b.setVisible(False) - self.signal_strength_a2.setVisible(False) - self.signal_strength_b2.setVisible(False) - self.signal_strength_a_fill.setVisible(False) - self.signal_strength_b_fill.setVisible(False) + self.signalStrengthA.setVisible(False) + self.signalStrengthB.setVisible(False) + self.signalStrengthA2.setVisible(False) + self.signalStrengthB2.setVisible(False) + self.signalStrengthAFill.setVisible(False) + self.signalStrengthBFill.setVisible(False) self.signal_power1.emit(INVALID_POWER) self.signal_power2.emit(INVALID_POWER) @@ -659,7 +661,7 @@ def plot_autolock_target_line(self, combined_error_signal): else: self.lock_target_line.setVisible(False) - def update_signal_history(self, to_plot): + def update_or_reset_signal_history(self, to_plot): update_signal_history( self.control_signal_history_data, self.monitor_signal_history_data, @@ -678,24 +680,23 @@ def scale(arr): arr *= 1 / timescale * N_POINTS return arr - history = self.control_signal_history_data["values"] - self.control_signal_history.setData( - scale(self.control_signal_history_data["times"]), np.array(history) / V + history_values = self.control_signal_history_data["values"] + history_times = scale(self.control_signal_history_data["times"]) + self.controlSignalHistory.setData( + history_times, np.array(history_values) / V ) slow_values = self.control_signal_history_data["slow_values"] - self.slow_history.setData( - scale(self.control_signal_history_data["slow_times"]), - np.array(slow_values) / V, - ) + slow_times = scale(self.control_signal_history_data["slow_times"]) + self.slowHistory.setData(slow_times, np.array(slow_values) / V) if not self.parameters.dual_channel.value: - self.monitor_signal_history.setData( + self.monitorSignalHistory.setData( scale(self.monitor_signal_history_data["times"]), np.array(self.monitor_signal_history_data["values"]) / V, ) - return history, slow_values + return history_values, slow_values return [], [] def enable_area_selection(self, selectable_width=0.5): From 34e648088f7781bfa093cfe7f3edcf9fedc70ee7 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 15:45:56 +0200 Subject: [PATCH 05/30] remove method for updating and plotting history --- linien-gui/linien_gui/ui/plot_widget.py | 199 +++++++++++++----------- 1 file changed, 110 insertions(+), 89 deletions(-) diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index ecbb5e19..a7abfb8c 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -221,8 +221,8 @@ def __init__(self, *args, **kwargs): self.last_plot_time = 0 self.plot_rate_limit = DEFAULT_PLOT_RATE_LIMIT - self._plot_paused = False - self._cached_plot_data = [] + self.plot_paused = False + self.cached_plot_data = [] self._should_reposition_reset_view_button = False def on_connection_established(self): @@ -310,7 +310,7 @@ def mouseReleaseEvent(self, event): # transmitted which blocks the autolock *sorted([x0, x]), pickle.dumps(last_combined_error_signal), - additional_spectra=pickle.dumps(self._cached_plot_data), + additional_spectra=pickle.dumps(self.cached_plot_data), ) ( @@ -360,7 +360,7 @@ def on_autolock_selection_changed(self, value): if value: self.parameters.optimization_selection.value = False self.enable_area_selection(selectable_width=0.99) - self.pause_plot_and_cache_data() + self.pause_plot() elif not self.parameters.optimization_selection.value: self.disable_area_selection() self.resume_plot_and_clear_cache() @@ -369,7 +369,7 @@ def on_optimization_selection_changed(self, value): if value: self.parameters.autolock_selection.value = False self.enable_area_selection(selectable_width=0.75) - self.pause_plot_and_cache_data() + self.pause_plot() elif not self.parameters.autolock_selection.value: self.disable_area_selection() self.resume_plot_and_clear_cache() @@ -413,7 +413,7 @@ def on_new_plot_data_received(self, to_plot): if ( time_beginning - self.last_plot_time <= self.plot_rate_limit - and not self._plot_paused + and not self.plot_paused ): # don't plot too often as it only causes unnecessary load this does not # apply if plot is paused, because in this case we want to collect all the @@ -446,23 +446,27 @@ def on_new_plot_data_received(self, to_plot): # we also call this if the laser is not locked because it resets the history # in this case - history, slow_history = self.update_or_reset_signal_history(to_plot) + update_signal_history( + self.control_signal_history_data, + self.monitor_signal_history_data, + to_plot, + self.parameters.lock.value, + self.parameters.control_signal_history_length.value, + ) if self.parameters.lock.value: all_signals = ( to_plot["error_signal"], to_plot["control_signal"], - history, - slow_history, + self.control_signal_history_data["values"], + self.control_signal_history_data["slow_values"], ) + dual_channel = self.parameters.dual_channel.value + timescale = self.parameters.control_signal_history_length.value + self.errorSignal1.setVisible(False) self.monitorOrErrorSignal2.setVisible(False) - self.controlSignalHistory.setVisible(True) - self.slowHistory.setVisible(self.parameters.pid_on_slow_enabled.value) - self.monitorSignalHistory.setVisible( - not self.parameters.dual_channel.value - ) self.signalStrengthA.setVisible(False) self.signalStrengthB.setVisible(False) self.signalStrengthA2.setVisible(False) @@ -481,42 +485,77 @@ def on_new_plot_data_received(self, to_plot): list(range(len(to_plot["control_signal"]))), to_plot["control_signal"] / V, ) + + self.controlSignalHistory.setVisible(True) + self.controlSignalHistory.setData( + scale_history_times( + self.control_signal_history_data["times"], timescale + ), + np.array(self.control_signal_history_data["values"]) / V, + ) + + self.slowHistory.setVisible(self.parameters.pid_on_slow_enabled.value) + self.slowHistory.setData( + scale_history_times( + self.control_signal_history_data["slow_times"], timescale + ), + np.array(self.control_signal_history_data["slow_values"]) / V, + ) + + self.monitorSignalHistory.setVisible(not dual_channel) + if not dual_channel: + self.monitorSignalHistory.setData( + scale_history_times( + self.monitor_signal_history_data["times"], timescale + ), + np.array(self.monitor_signal_history_data["values"]) / V, + ) self.plot_autolock_target_line(None) else: dual_channel = self.parameters.dual_channel.value - self.errorSignal1.setVisible(True) monitor_signal = to_plot.get("monitor_signal") error_signal_2 = to_plot.get("error_signal_2") - self.monitorOrErrorSignal2.setVisible( - error_signal_2 is not None or monitor_signal is not None + error_signal_1 = to_plot["error_signal_1"] + monitor_or_error_signal_2 = ( + error_signal_2 if error_signal_2 is not None else monitor_signal ) + self.combinedErrorSignal.setVisible(dual_channel) self.controlSignal.setVisible(False) self.controlSignalHistory.setVisible(False) self.slowHistory.setVisible(False) self.monitorSignalHistory.setVisible(False) - s1 = to_plot["error_signal_1"] - s2 = error_signal_2 if error_signal_2 is not None else monitor_signal - combined_error_signal = combine_error_signal( - (s1, s2), + (error_signal_1, monitor_or_error_signal_2), dual_channel, self.parameters.channel_mixing.value, self.parameters.combined_offset.value, ) - if self._plot_paused: - self._cached_plot_data.append(combined_error_signal) + if self.plot_paused: + self.cached_plot_data.append(combined_error_signal) # don't save too much - self._cached_plot_data = self._cached_plot_data[-20:] + self.cached_plot_data = self.cached_plot_data[-20:] return - all_signals = [s1, s2] + [combined_error_signal] + all_signals = [error_signal_1, monitor_or_error_signal_2] + [ + combined_error_signal + ] self.last_plot_data = all_signals - self.monitorOrErrorSignal2.setData(list(range(len(s2))), s2 / V) - self.errorSignal1.setData(list(range(len(s1))), s1 / V) + self.monitorOrErrorSignal2.setVisible( + error_signal_2 is not None or monitor_signal is not None + ) + self.monitorOrErrorSignal2.setData( + list(range(len(monitor_or_error_signal_2))), + monitor_or_error_signal_2 / V, + ) + + self.errorSignal1.setVisible(True) + self.errorSignal1.setData( + list(range(len(error_signal_1))), error_signal_1 / V + ) self.combinedErrorSignal.setData( list(range(len(combined_error_signal))), combined_error_signal / V ) @@ -526,22 +565,34 @@ def on_new_plot_data_received(self, to_plot): not self.parameters.pid_only_mode.value ): # check whether to plot signal strengths using quadratures - s1q = to_plot.get("error_signal_1_quadrature") - s2q = to_plot.get("error_signal_2_quadrature") - - self.signalStrengthA.setVisible(s1q is not None) - self.signalStrengthA2.setVisible(s1q is not None) - self.signalStrengthAFill.setVisible(s1q is not None) - - self.signalStrengthB.setVisible(s2q is not None) - self.signalStrengthB2.setVisible(s2q is not None) - self.signalStrengthBFill.setVisible(s2q is not None) - - if s1q is not None: + error_signal_1_quadrature = to_plot.get("error_signal_1_quadrature") + error_signal_2_quadrature = to_plot.get("error_signal_2_quadrature") + + self.signalStrengthA.setVisible( + error_signal_1_quadrature is not None + ) + self.signalStrengthA2.setVisible( + error_signal_1_quadrature is not None + ) + self.signalStrengthAFill.setVisible( + error_signal_1_quadrature is not None + ) + + self.signalStrengthB.setVisible( + error_signal_2_quadrature is not None + ) + self.signalStrengthB2.setVisible( + error_signal_2_quadrature is not None + ) + self.signalStrengthBFill.setVisible( + error_signal_2_quadrature is not None + ) + + if error_signal_1_quadrature is not None: max_signal_strength_V = ( self.plot_signal_strength( - s1, - s1q, + error_signal_1, + error_signal_1_quadrature, self.signalStrengthA, self.signalStrengthA2, self.signalStrengthAFill, @@ -563,11 +614,11 @@ def on_new_plot_data_received(self, to_plot): else: self.signal_power1.emit(INVALID_POWER) - if s2q is not None: + if error_signal_2_quadrature is not None: max_signal_strength2_V = ( self.plot_signal_strength( - s2, - s2q, + monitor_or_error_signal_2, + error_signal_2_quadrature, self.signalStrengthB, self.signalStrengthB2, self.signalStrengthBFill, @@ -661,44 +712,6 @@ def plot_autolock_target_line(self, combined_error_signal): else: self.lock_target_line.setVisible(False) - def update_or_reset_signal_history(self, to_plot): - update_signal_history( - self.control_signal_history_data, - self.monitor_signal_history_data, - to_plot, - self.parameters.lock.value, - self.parameters.control_signal_history_length.value, - ) - - if self.parameters.lock.value: - - def scale(arr): - timescale = self.parameters.control_signal_history_length.value - if arr: - arr = np.array(arr) - arr -= arr[0] - arr *= 1 / timescale * N_POINTS - return arr - - history_values = self.control_signal_history_data["values"] - history_times = scale(self.control_signal_history_data["times"]) - self.controlSignalHistory.setData( - history_times, np.array(history_values) / V - ) - - slow_values = self.control_signal_history_data["slow_values"] - slow_times = scale(self.control_signal_history_data["slow_times"]) - self.slowHistory.setData(slow_times, np.array(slow_values) / V) - - if not self.parameters.dual_channel.value: - self.monitorSignalHistory.setData( - scale(self.monitor_signal_history_data["times"]), - np.array(self.monitor_signal_history_data["values"]) / V, - ) - - return history_values, slow_values - return [], [] - def enable_area_selection(self, selectable_width=0.5): self.selection_running = True @@ -723,17 +736,17 @@ def disable_area_selection(self): for overlay in self.boundary_overlays: overlay.setVisible(False) - def pause_plot_and_cache_data(self): + def pause_plot(self): """ - This function pauses plot updates. All incoming data is cached though. This is - useful for letting the user select a line that is then used in the autolock. + Pauses plot updates. All incoming data is cached though. This is useful for + letting the user select a line that is then used in the autolock. """ - self._plot_paused = True + self.plot_paused = True def resume_plot_and_clear_cache(self): - """Resumes plotting again.""" - self._plot_paused = False - self._cached_plot_data = [] + """Resume plotting again.""" + self.plot_paused = False + self.cached_plot_data = [] # called when widget is resized def position_reset_view_button(self): @@ -759,3 +772,11 @@ def resizeEvent(self, event, *args, **kwargs): # we don't do it directly here because this causes problems for some reason self._should_reposition_reset_view_button = True + + +def scale_history_times(arr: np.ndarray, timescale: int) -> np.ndarray: + if arr: + arr = np.array(arr) + arr -= arr[0] + arr *= 1 / timescale * N_POINTS + return arr From 518315555c60289905a99a2ace25930f706137f8 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 31 May 2024 16:33:44 +0200 Subject: [PATCH 06/30] add separate monitor signal --- linien-gui/linien_gui/config.py | 7 +- linien-gui/linien_gui/ui/main_window.py | 29 +++--- linien-gui/linien_gui/ui/main_window.ui | 17 +++- linien-gui/linien_gui/ui/plot_widget.py | 121 ++++++++++-------------- 4 files changed, 80 insertions(+), 94 deletions(-) diff --git a/linien-gui/linien_gui/config.py b/linien-gui/linien_gui/config.py index d41dd7f8..55dcbe4a 100644 --- a/linien-gui/linien_gui/config.py +++ b/linien-gui/linien_gui/config.py @@ -44,9 +44,10 @@ class Color(Enum): - SPECTRUM1 = 0 - SPECTRUM2 = 1 - SPECTRUM_COMBINED = 2 + ERROR1 = 0 + ERROR2 = 1 + ERROR_COMBINED = 2 + MONITOR = 1 CONTROL_SIGNAL = 0 CONTROL_SIGNAL_HISTORY = 1 SLOW_HISTORY = 3 diff --git a/linien-gui/linien_gui/ui/main_window.py b/linien-gui/linien_gui/ui/main_window.py index 62225d25..5d6ad3c9 100644 --- a/linien-gui/linien_gui/ui/main_window.py +++ b/linien-gui/linien_gui/ui/main_window.py @@ -50,9 +50,10 @@ class MainWindow(QtWidgets.QMainWindow): power_channel_1: QtWidgets.QLabel power_channel_2: QtWidgets.QLabel legend_unlocked: QtWidgets.QHBoxLayout - spectrum1LegendLabel: QtWidgets.QLabel - spectrum2LegendLabel: QtWidgets.QLabel - combinedSpectrumLegendLabel: QtWidgets.QLabel + error1LegendLabel: QtWidgets.QLabel + error2LegendLabel: QtWidgets.QLabel + monitorLegendLabel: QtWidgets.QLabel + combinedErrorLegendLabel: QtWidgets.QLabel sweepControlWidget: SweepControlWidget sweepAmplitudeSpinBox: CustomDoubleSpinBox sweepCenterSpinBox: CustomDoubleSpinBox @@ -173,23 +174,23 @@ def set_color(el, color: Color): ) ) - set_color(self.spectrum1LegendLabel, Color.SPECTRUM1) - set_color(self.spectrum2LgendLabel, Color.SPECTRUM2) - set_color(self.combinedSpectrumLegendLabel, Color.SPECTRUM_COMBINED) - set_color(self.errorSignalLegendLabel, Color.SPECTRUM_COMBINED) + set_color(self.error1LegendLabel, Color.ERROR1) + set_color(self.error2LegendLabel, Color.ERROR2) + set_color(self.monitorLegendLabel, Color.MONITOR) + set_color(self.combinedErrorLegendLabel, Color.ERROR_COMBINED) + set_color(self.errorSignalLegendLabel, Color.ERROR_COMBINED) set_color(self.controlSignalLegendLabel, Color.CONTROL_SIGNAL) set_color(self.controlSignalHistoryLegendLabel, Color.CONTROL_SIGNAL_HISTORY) set_color(self.slowSignalHistoryLegendLabel, Color.SLOW_HISTORY) set_color(self.monitorSignalHistoryLegendLabel, Color.MONITOR_SIGNAL_HISTORY) - def update_legend_text(self, dual_channel): - self.spectrum1LegendLabel.setText( - "error signal" if not dual_channel else "error signal 1" + def update_legend_text(self, dual_channel: bool) -> None: + self.error1LegendLabel.setVisible(dual_channel) + self.error2LegendLabel.setVisible(dual_channel) + self.monitorLegendLabel.setVisible(not dual_channel) + self.combinedErrorLegendLabel.setText( + "error" if not dual_channel else "combined error" ) - self.spectrum2LgendLabel.setText( - "monitor" if not dual_channel else "error signal 2" - ) - self.combinedSpectrumLegendLabel.setVisible(dual_channel) def show(self, host: str, name: str) -> None: # type: ignore[override] self.setWindowTitle( diff --git a/linien-gui/linien_gui/ui/main_window.ui b/linien-gui/linien_gui/ui/main_window.ui index 010c2e2f..3d8b8bf8 100644 --- a/linien-gui/linien_gui/ui/main_window.ui +++ b/linien-gui/linien_gui/ui/main_window.ui @@ -471,9 +471,9 @@ p, li { white-space: pre-wrap; } - + - sig1 + error 1 false @@ -481,9 +481,9 @@ p, li { white-space: pre-wrap; } - + - sig2 + error 2 false @@ -491,7 +491,14 @@ p, li { white-space: pre-wrap; } - + + + monitor + + + + + combined diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index a7abfb8c..64d65801 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -168,10 +168,12 @@ def __init__(self, *args, **kwargs): self.addItem(self.signalStrengthBFill) self.errorSignal1 = pg.PlotCurveItem() self.addItem(self.errorSignal1) - self.monitorOrErrorSignal2 = pg.PlotCurveItem() - self.addItem(self.monitorOrErrorSignal2) + self.errorSignal2 = pg.PlotCurveItem() + self.addItem(self.errorSignal2) self.combinedErrorSignal = pg.PlotCurveItem() self.addItem(self.combinedErrorSignal) + self.monitorSignal = pg.PlotCurveItem() + self.addItem(self.monitorSignal) self.controlSignal = pg.PlotCurveItem() self.addItem(self.controlSignal) @@ -344,9 +346,10 @@ def on_plot_settings_changed(self, *args): pen_width = self.app.settings.plot_line_width.value for curve, color in { - self.errorSignal1: Color.SPECTRUM1, - self.monitorOrErrorSignal2: Color.SPECTRUM2, - self.combinedErrorSignal: Color.SPECTRUM_COMBINED, + self.errorSignal1: Color.ERROR1, + self.errorSignal2: Color.ERROR2, + self.combinedErrorSignal: Color.ERROR_COMBINED, + self.monitorSignal: Color.MONITOR, self.controlSignal: Color.CONTROL_SIGNAL, self.controlSignalHistory: Color.CONTROL_SIGNAL_HISTORY, self.slowHistory: Color.SLOW_HISTORY, @@ -455,18 +458,12 @@ def on_new_plot_data_received(self, to_plot): ) if self.parameters.lock.value: - all_signals = ( - to_plot["error_signal"], - to_plot["control_signal"], - self.control_signal_history_data["values"], - self.control_signal_history_data["slow_values"], - ) - dual_channel = self.parameters.dual_channel.value timescale = self.parameters.control_signal_history_length.value self.errorSignal1.setVisible(False) - self.monitorOrErrorSignal2.setVisible(False) + self.errorSignal2.setVisible(False) + self.monitorSignal.setVisible(False) self.signalStrengthA.setVisible(False) self.signalStrengthB.setVisible(False) self.signalStrengthA2.setVisible(False) @@ -520,17 +517,11 @@ def on_new_plot_data_received(self, to_plot): error_signal_2 if error_signal_2 is not None else monitor_signal ) - self.combinedErrorSignal.setVisible(dual_channel) - self.controlSignal.setVisible(False) - self.controlSignalHistory.setVisible(False) - self.slowHistory.setVisible(False) - self.monitorSignalHistory.setVisible(False) - combined_error_signal = combine_error_signal( (error_signal_1, monitor_or_error_signal_2), dual_channel, self.parameters.channel_mixing.value, - self.parameters.combined_offset.value, + self.parameters.combined_offset.value if dual_channel else 0, ) if self.plot_paused: @@ -539,60 +530,59 @@ def on_new_plot_data_received(self, to_plot): self.cached_plot_data = self.cached_plot_data[-20:] return - all_signals = [error_signal_1, monitor_or_error_signal_2] + [ + self.last_plot_data = [error_signal_1, monitor_or_error_signal_2] + [ combined_error_signal ] - self.last_plot_data = all_signals - self.monitorOrErrorSignal2.setVisible( - error_signal_2 is not None or monitor_signal is not None - ) - self.monitorOrErrorSignal2.setData( - list(range(len(monitor_or_error_signal_2))), - monitor_or_error_signal_2 / V, - ) + self.controlSignal.setVisible(False) + self.controlSignalHistory.setVisible(False) + self.slowHistory.setVisible(False) + self.monitorSignalHistory.setVisible(False) - self.errorSignal1.setVisible(True) - self.errorSignal1.setData( - list(range(len(error_signal_1))), error_signal_1 / V - ) + self.combinedErrorSignal.setVisible(True) self.combinedErrorSignal.setData( - list(range(len(combined_error_signal))), combined_error_signal / V + list(range(len(error_signal_1))), error_signal_1 / V ) + + self.errorSignal1.setVisible(dual_channel) + if error_signal_1 is not None: + self.errorSignal1.setData( + list(range(len(error_signal_1))), error_signal_1 / V + ) + + self.errorSignal2.setVisible(dual_channel) + if error_signal_2 is not None: + self.errorSignal2.setData( + list(range(len(error_signal_2))), error_signal_2 / V + ) + + self.monitorSignal.setVisible(not dual_channel) + if monitor_signal is not None: + self.monitorSignal.setData( + list(range(len(monitor_signal))), monitor_signal / V + ) + self.plot_autolock_target_line(combined_error_signal) if (self.parameters.modulation_frequency.value != 0) and ( not self.parameters.pid_only_mode.value ): # check whether to plot signal strengths using quadratures - error_signal_1_quadrature = to_plot.get("error_signal_1_quadrature") - error_signal_2_quadrature = to_plot.get("error_signal_2_quadrature") + error_1_quadrature = to_plot.get("error_signal_1_quadrature") + error_2_quadrature = to_plot.get("error_signal_2_quadrature") - self.signalStrengthA.setVisible( - error_signal_1_quadrature is not None - ) - self.signalStrengthA2.setVisible( - error_signal_1_quadrature is not None - ) - self.signalStrengthAFill.setVisible( - error_signal_1_quadrature is not None - ) - - self.signalStrengthB.setVisible( - error_signal_2_quadrature is not None - ) - self.signalStrengthB2.setVisible( - error_signal_2_quadrature is not None - ) - self.signalStrengthBFill.setVisible( - error_signal_2_quadrature is not None - ) + self.signalStrengthA.setVisible(error_1_quadrature is not None) + self.signalStrengthA2.setVisible(error_1_quadrature is not None) + self.signalStrengthAFill.setVisible(error_1_quadrature is not None) + self.signalStrengthB.setVisible(error_2_quadrature is not None) + self.signalStrengthB2.setVisible(error_2_quadrature is not None) + self.signalStrengthBFill.setVisible(error_2_quadrature is not None) - if error_signal_1_quadrature is not None: + if error_1_quadrature is not None: max_signal_strength_V = ( self.plot_signal_strength( error_signal_1, - error_signal_1_quadrature, + error_1_quadrature, self.signalStrengthA, self.signalStrengthA2, self.signalStrengthAFill, @@ -601,12 +591,6 @@ def on_new_plot_data_received(self, to_plot): ) / V ) - all_signals.append( - [ - max_signal_strength_V * V, - -1 * max_signal_strength_V * V, - ] - ) self.signal_power1.emit( peak_voltage_to_dBm(max_signal_strength_V) @@ -614,11 +598,11 @@ def on_new_plot_data_received(self, to_plot): else: self.signal_power1.emit(INVALID_POWER) - if error_signal_2_quadrature is not None: + if error_2_quadrature is not None: max_signal_strength2_V = ( self.plot_signal_strength( monitor_or_error_signal_2, - error_signal_2_quadrature, + error_2_quadrature, self.signalStrengthB, self.signalStrengthB2, self.signalStrengthBFill, @@ -628,13 +612,6 @@ def on_new_plot_data_received(self, to_plot): / V ) - all_signals.append( - [ - max_signal_strength2_V * V, - -1 * max_signal_strength2_V * V, - ] - ) - self.signal_power2.emit( peak_voltage_to_dBm(max_signal_strength2_V) ) From 4bdaf878d6753cb04b9df27dd5de2404512e84f0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 17:01:36 +0000 Subject: [PATCH 07/30] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.4.2 → 24.8.0](https://github.com/psf/black/compare/24.4.2...24.8.0) - [github.com/pycqa/flake8: 7.0.0 → 7.1.1](https://github.com/pycqa/flake8/compare/7.0.0...7.1.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d8c3b52f..30d88e4f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black exclude: ^(gateware/logic/|gateware/lowlevel/|gateware/linien_module.py|linien-server/linien_server/csrmap.py) @@ -12,7 +12,7 @@ repos: name: isort (python) - repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.1.1 hooks: - id: flake8 exclude: linien-server/linien_server/csrmap.py From f96f3ef9c26342ddb011735208a2c44b8ff57ec0 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 10:35:26 +0200 Subject: [PATCH 08/30] comment default colors --- linien-gui/linien_gui/config.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/linien-gui/linien_gui/config.py b/linien-gui/linien_gui/config.py index 55dcbe4a..6111cd53 100644 --- a/linien-gui/linien_gui/config.py +++ b/linien-gui/linien_gui/config.py @@ -34,11 +34,11 @@ DEFAULT_PLOT_RATE_LIMIT = 0.1 DEFAULT_COLORS = [ - (200, 0, 0, 200), - (0, 200, 0, 200), - (0, 0, 200, 200), - (200, 200, 0, 200), - (200, 0, 200, 200), + (200, 0, 0, 200), # red + (0, 200, 0, 200), # green + (0, 0, 200, 200), # blue + (200, 200, 0, 200), # yellow + (200, 0, 200, 200), # pink ] N_COLORS = len(DEFAULT_COLORS) From 2379e2aa405dc13065df698323b91316257dcb73 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 13:21:51 +0200 Subject: [PATCH 09/30] use unique Tableau colors for everything --- linien-gui/linien_gui/config.py | 32 +++-- linien-gui/linien_gui/ui/view_panel.py | 82 ++++++------ linien-gui/linien_gui/ui/view_panel.ui | 167 +++++++++++++++++++------ 3 files changed, 193 insertions(+), 88 deletions(-) diff --git a/linien-gui/linien_gui/config.py b/linien-gui/linien_gui/config.py index 6111cd53..eb065a14 100644 --- a/linien-gui/linien_gui/config.py +++ b/linien-gui/linien_gui/config.py @@ -34,24 +34,27 @@ DEFAULT_PLOT_RATE_LIMIT = 0.1 DEFAULT_COLORS = [ - (200, 0, 0, 200), # red - (0, 200, 0, 200), # green - (0, 0, 200, 200), # blue - (200, 200, 0, 200), # yellow - (200, 0, 200, 200), # pink + (214, 39, 40, 200), # 0: red + (44, 160, 44, 200), # 1: green + (31, 119, 180, 200), # 2: blue + (188, 189, 34, 200), # 3: yellow + (227, 119, 194, 200), # 4: pink + (255, 127, 14, 200), # 5: orange + (148, 103, 189, 200), # 6: purple + (23, 190, 207, 200), # 7: turquoise ] N_COLORS = len(DEFAULT_COLORS) class Color(Enum): - ERROR1 = 0 - ERROR2 = 1 - ERROR_COMBINED = 2 - MONITOR = 1 - CONTROL_SIGNAL = 0 - CONTROL_SIGNAL_HISTORY = 1 - SLOW_HISTORY = 3 - MONITOR_SIGNAL_HISTORY = 4 + ERROR_COMBINED = 0 + SLOW_HISTORY = 1 + MONITOR = 2 + CONTROL_SIGNAL = 3 + ERROR1 = 4 + CONTROL_SIGNAL_HISTORY = 5 + ERROR2 = 6 + MONITOR_SIGNAL_HISTORY = 7 class Setting: @@ -106,6 +109,9 @@ def __init__(self): self.plot_color_2 = Setting(start=DEFAULT_COLORS[2]) self.plot_color_3 = Setting(start=DEFAULT_COLORS[3]) self.plot_color_4 = Setting(start=DEFAULT_COLORS[4]) + self.plot_color_5 = Setting(start=DEFAULT_COLORS[5]) + self.plot_color_6 = Setting(start=DEFAULT_COLORS[6]) + self.plot_color_7 = Setting(start=DEFAULT_COLORS[7]) # save changed settings to disk for _, setting in self: diff --git a/linien-gui/linien_gui/ui/view_panel.py b/linien-gui/linien_gui/ui/view_panel.py index d39d3857..2dfae343 100644 --- a/linien-gui/linien_gui/ui/view_panel.py +++ b/linien-gui/linien_gui/ui/view_panel.py @@ -28,21 +28,21 @@ class ViewPanel(QtWidgets.QWidget): - plot_line_width: CustomDoubleSpinBoxNoSign - plot_line_opacity: CustomSpinBox - plot_fill_opacity: CustomSpinBox - display_color_0: QtWidgets.QLabel - display_color_1: QtWidgets.QLabel - display_color_2: QtWidgets.QLabel - display_color_3: QtWidgets.QLabel - display_color_4: QtWidgets.QLabel - edit_color_0: QtWidgets.QToolButton - edit_color_1: QtWidgets.QToolButton - edit_color_2: QtWidgets.QToolButton - edit_color_3: QtWidgets.QToolButton - edit_color_4: QtWidgets.QToolButton - export_data: QtWidgets.QPushButton - export_select_file: QtWidgets.QPushButton + plotLineWidthSpinBox: CustomDoubleSpinBoxNoSign + plotLineOpacitySpinBox: CustomSpinBox + plotFillOpacitySpinBox: CustomSpinBox + displayColorLabel0: QtWidgets.QLabel + displayColorLabel1: QtWidgets.QLabel + displayColorLabel2: QtWidgets.QLabel + displayColorLabel3: QtWidgets.QLabel + displayColorLabel4: QtWidgets.QLabel + editColorButton0: QtWidgets.QToolButton + editColorButton1: QtWidgets.QToolButton + editColorButton2: QtWidgets.QToolButton + editColorButton3: QtWidgets.QToolButton + editColorButton4: QtWidgets.QToolButton + exportDataPushButton: QtWidgets.QPushButton + exportSelectFilePushButton: QtWidgets.QPushButton def __init__(self, *args, **kwargs): super(ViewPanel, self).__init__(*args, **kwargs) @@ -50,20 +50,24 @@ def __init__(self, *args, **kwargs): self.app = get_linien_app_instance() self.app.connection_established.connect(self.on_connection_established) - self.export_select_file.clicked.connect(self.do_export_select_file) - self.export_data.clicked.connect(self.do_export_data) + self.exportSelectFilePushButton.clicked.connect(self.export_select_file) + self.exportDataPushButton.clicked.connect(self.export_data) - self.plot_line_width.setKeyboardTracking(False) - self.plot_line_width.valueChanged.connect(self.plot_line_width_changed) + self.plotLineWidthSpinBox.setKeyboardTracking(False) + self.plotLineWidthSpinBox.valueChanged.connect(self.on_plot_line_width_changed) - self.plot_line_opacity.setKeyboardTracking(False) - self.plot_line_opacity.valueChanged.connect(self.plot_line_opacity_changed) + self.plotLineOpacitySpinBox.setKeyboardTracking(False) + self.plotLineOpacitySpinBox.valueChanged.connect( + self.on_plot_line_opacity_changed + ) - self.plot_fill_opacity.setKeyboardTracking(False) - self.plot_fill_opacity.valueChanged.connect(self.plot_fill_opacity_changed) + self.plotFillOpacitySpinBox.setKeyboardTracking(False) + self.plotFillOpacitySpinBox.valueChanged.connect( + self.on_plot_fill_opacity_changed + ) for color_idx in range(N_COLORS): - getattr(self, f"edit_color_{color_idx}").clicked.connect( + getattr(self, f"editColorButton{color_idx}").clicked.connect( lambda *args, color_idx=color_idx: self.edit_color(color_idx) ) @@ -77,13 +81,13 @@ def on_connection_established(self): self.parameters = self.app.parameters self.control = self.app.control - param2ui(self.app.settings.plot_line_width, self.plot_line_width) - param2ui(self.app.settings.plot_line_opacity, self.plot_line_opacity) - param2ui(self.app.settings.plot_fill_opacity, self.plot_fill_opacity) + param2ui(self.app.settings.plot_line_width, self.plotLineWidthSpinBox) + param2ui(self.app.settings.plot_line_opacity, self.plotLineOpacitySpinBox) + param2ui(self.app.settings.plot_fill_opacity, self.plotFillOpacitySpinBox) def preview_colors(*args): for color_idx in range(N_COLORS): - element = getattr(self, f"display_color_{color_idx}") + element = getattr(self, f"displayColorLabel{color_idx}") setting = getattr(self.app.settings, f"plot_color_{color_idx}") element.setStyleSheet( f"background-color: {color_to_hex(setting.value)}" @@ -94,16 +98,16 @@ def preview_colors(*args): preview_colors ) - def plot_line_width_changed(self): - self.app.settings.plot_line_width.value = self.plot_line_width.value() + def on_plot_line_width_changed(self): + self.app.settings.plot_line_width.value = self.plotLineWidthSpinBox.value() - def plot_line_opacity_changed(self): - self.app.settings.plot_line_opacity.value = self.plot_line_opacity.value() + def on_plot_line_opacity_changed(self): + self.app.settings.plot_line_opacity.value = self.plotLineOpacitySpinBox.value() - def plot_fill_opacity_changed(self): - self.app.settings.plot_fill_opacity.value = self.plot_fill_opacity.value() + def on_plot_fill_opacity_changed(self): + self.app.settings.plot_fill_opacity.value = self.plotFillOpacitySpinBox.value() - def do_export_select_file(self): + def export_select_file(self): options = QtWidgets.QFileDialog.Options() # options |= QtWidgets.QFileDialog.DontUseNativeDialog default_ext = ".json" @@ -118,10 +122,12 @@ def do_export_select_file(self): if not fn.endswith(default_ext): fn = fn + default_ext self.export_fn = fn - self.export_select_file.setText(f"File selected: {path.split(fn)[-1]}") - self.export_data.setEnabled(True) + self.exportSelectFilePushButton.setText( + f"File selected: {path.split(fn)[-1]}" + ) + self.exportDataPushButton.setEnabled(True) - def do_export_data(self): + def export_data(self): fn = self.export_fn counter = 0 diff --git a/linien-gui/linien_gui/ui/view_panel.ui b/linien-gui/linien_gui/ui/view_panel.ui index 29e70899..c0bbc611 100644 --- a/linien-gui/linien_gui/ui/view_panel.ui +++ b/linien-gui/linien_gui/ui/view_panel.ui @@ -6,7 +6,7 @@ 0 0 - 400 + 399 672 @@ -15,7 +15,7 @@ - + 0 @@ -27,7 +27,7 @@ - + Just pan (zoom) the plot with your mouse (wheel). Click "Reset View" button for automatic scaling. Right click on plot to set up fixed scaling. @@ -40,13 +40,13 @@ - + Graph - + @@ -55,7 +55,7 @@ - + 1 @@ -76,7 +76,7 @@ - + @@ -85,7 +85,7 @@ - + 255 @@ -97,7 +97,7 @@ - + @@ -106,7 +106,7 @@ - + 255 @@ -118,16 +118,16 @@ - + - + - Color 1 + (Combined) Error Signal - + 50 @@ -140,7 +140,7 @@ - + ... @@ -152,16 +152,16 @@ - + - + - Color 2 + Slow Control History - + 50 @@ -174,7 +174,7 @@ - + ... @@ -183,16 +183,16 @@ - + - + - Color 3 + Monitor Signal - + 50 @@ -205,7 +205,7 @@ - + ... @@ -214,16 +214,16 @@ - + - + - Color 4 + Control Signal - + 50 @@ -236,7 +236,7 @@ - + ... @@ -245,16 +245,16 @@ - + - + - Color 5 + Error Signal 1 - + 50 @@ -267,7 +267,100 @@ - + + + ... + + + + + + + + + + + Control Signal History + + + + + + + + 50 + 16777215 + + + + + + + + + + + ... + + + + + + + + + + + Error Signal 2 + + + + + + + + 50 + 16777215 + + + + + + + + + + + ... + + + + + + + + + + + Monitor Signal History + + + + + + + + 50 + 16777215 + + + + + + + + + ... @@ -291,7 +384,7 @@ - + Select file @@ -311,7 +404,7 @@ - + false From bfa678f05dd4b768163c3fa314beab9bbd718919 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 14:13:04 +0200 Subject: [PATCH 10/30] fix mapping of colors and shading --- linien-gui/linien_gui/ui/plot_widget.py | 12 ++++++++++-- linien-gui/linien_gui/ui/view_panel.ui | 24 ++++++++++++------------ 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index 64d65801..8f845bac 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -579,6 +579,11 @@ def on_new_plot_data_received(self, to_plot): self.signalStrengthBFill.setVisible(error_2_quadrature is not None) if error_1_quadrature is not None: + + if self.parameters.dual_channel.value: + color = Color.ERROR1.value + else: + color = Color.ERROR_COMBINED.value max_signal_strength_V = ( self.plot_signal_strength( error_signal_1, @@ -587,7 +592,7 @@ def on_new_plot_data_received(self, to_plot): self.signalStrengthA2, self.signalStrengthAFill, self.parameters.offset_a.value, - self.app.settings.plot_color_0.value, + getattr(self.app.settings, f"plot_color_{color}").value, ) / V ) @@ -607,7 +612,10 @@ def on_new_plot_data_received(self, to_plot): self.signalStrengthB2, self.signalStrengthBFill, self.parameters.offset_b.value, - self.app.settings.plot_color_1.value, + getattr( + self.app.settings, + f"plot_color_{Color.ERROR2.value}", + ).value, ) / V ) diff --git a/linien-gui/linien_gui/ui/view_panel.ui b/linien-gui/linien_gui/ui/view_panel.ui index c0bbc611..94ed2414 100644 --- a/linien-gui/linien_gui/ui/view_panel.ui +++ b/linien-gui/linien_gui/ui/view_panel.ui @@ -245,16 +245,16 @@ - + - + Error Signal 1 - + 50 @@ -267,7 +267,7 @@ - + ... @@ -307,16 +307,16 @@ - + - + Error Signal 2 - + 50 @@ -329,7 +329,7 @@ - + ... @@ -338,16 +338,16 @@ - + - + Monitor Signal History - + 50 @@ -360,7 +360,7 @@ - + ... From c6dad0f96e75a752ba7661dae3c5f0d0f2573022 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 14:20:38 +0200 Subject: [PATCH 11/30] update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 456627ab..14be3b2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +* Switched to Tableau color scheme and make colors consistent, i.e. signals have the same color while sweeping and when locked. By @bleykauf in https://github.com/linien-org/linien/pull/419. + ### Added * Show differences when local and remote parameters do not match by @bleykauf in https://github.com/linien-org/linien/pull/400 * Show voltage on the x-axis when sweeping by @bleykauf in https://github.com/linien-org/linien/pull/404 From 9431a429da81b785ddedbebfeeed9bd3fd0c7e5b Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 14:45:27 +0200 Subject: [PATCH 12/30] fix examples in readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 80b9ef0f..9932379b 100644 --- a/README.md +++ b/README.md @@ -89,10 +89,10 @@ from linien_client.deploy import install_remote_server device = Device( host="rp-xxxxxx.local", - user="root", + username="root", password="root" ) -instalL_remote_server(device) +install_remote_server(device) ``` Finally, you can install the server manually, by connecting to the RedPitaya via SSH and @@ -240,7 +240,7 @@ from linien_common.common import MHz, Vpp, ANALOG_OUT_V dev = Device( host="rp-xxxxxx.local", - user="root", + username="root", password="root" ) c = LinienClient(dev) @@ -335,7 +335,7 @@ from time import sleep c = LinienClient( host="rp-xxxxxx.local", - user="root", + username="root", password="root" ) c.connect(autostart_server=True, use_parameter_cache=True) From 8bef1c89234add69562748693513cdc22c690642 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 14:50:28 +0200 Subject: [PATCH 13/30] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14be3b2b..14d8b354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Show differences when local and remote parameters do not match by @bleykauf in https://github.com/linien-org/linien/pull/400 * Show voltage on the x-axis when sweeping by @bleykauf in https://github.com/linien-org/linien/pull/404 +### Fixed + +* Fixed example code in the readme by @bleykauf in https://github.com/linien-org/linien/pull/404, thanks to @Andrew-wi for reporting this issue + ## [2.0.4] - 2024-05-30 ### Fixed From e25a9dd8a6bfa85ded0ff49d8232425591122098 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 14:52:29 +0200 Subject: [PATCH 14/30] fix changelog --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14d8b354..3046ef22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,16 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed -* Switched to Tableau color scheme and make colors consistent, i.e. signals have the same color while sweeping and when locked. By @bleykauf in https://github.com/linien-org/linien/pull/419. - ### Added * Show differences when local and remote parameters do not match by @bleykauf in https://github.com/linien-org/linien/pull/400 * Show voltage on the x-axis when sweeping by @bleykauf in https://github.com/linien-org/linien/pull/404 +### Changed +* Switched to Tableau color scheme and make colors consistent, i.e. signals have the same color while sweeping and when locked. By @bleykauf in https://github.com/linien-org/linien/pull/419. + ### Fixed -* Fixed example code in the readme by @bleykauf in https://github.com/linien-org/linien/pull/404, thanks to @Andrew-wi for reporting this issue +* Fixed example code in the readme by @bleykauf in https://github.com/linien-org/linien/pull/420, thanks to @Andrew-wi for reporting this issue ## [2.0.4] - 2024-05-30 From 3b451431be691435cd8905688db80736a6c692e3 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 16:00:08 +0200 Subject: [PATCH 15/30] use Qt style names and add type-annotations --- linien-gui/linien_gui/ui/psd_plot_widget.py | 8 +-- linien-gui/linien_gui/ui/psd_window.py | 58 +++++++++++++-------- linien-gui/linien_gui/ui/psd_window.ui | 26 ++++----- 3 files changed, 53 insertions(+), 39 deletions(-) diff --git a/linien-gui/linien_gui/ui/psd_plot_widget.py b/linien-gui/linien_gui/ui/psd_plot_widget.py index 038aaa20..4689a9c1 100644 --- a/linien-gui/linien_gui/ui/psd_plot_widget.py +++ b/linien-gui/linien_gui/ui/psd_plot_widget.py @@ -1,5 +1,5 @@ # Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf +# Copyright 2021-2024 Bastian Leykauf # # This file is part of Linien and based on redpid. # @@ -212,7 +212,9 @@ def show_cursor_position(self, show): self.cursor_label.setVisible(show) def leaveEvent(self, QEvent): - """This method is called when the mouse used to hover the plot and - not left. In this case, we hide crosshair and cursor label.""" + """ + This method is called when the mouse used to hover the plot and not left. In + this case, we hide crosshair and cursor label. + """ super().leaveEvent(QEvent) self.show_cursor_position(False) diff --git a/linien-gui/linien_gui/ui/psd_window.py b/linien-gui/linien_gui/ui/psd_window.py index dea1dc7e..05eaea16 100644 --- a/linien-gui/linien_gui/ui/psd_window.py +++ b/linien-gui/linien_gui/ui/psd_window.py @@ -1,5 +1,5 @@ # Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf +# Copyright 2021-2024 Bastian Leykauf # # This file is part of Linien and based on redpid. # @@ -23,6 +23,8 @@ from linien_common.common import PSDAlgorithm from linien_gui.config import UI_PATH from linien_gui.dialogs import error_dialog +from linien_gui.ui.psd_plot_widget import PSDPlotWidget +from linien_gui.ui.psd_table_widget import PSDTableWidget from linien_gui.utils import ( RandomColorChoser, get_linien_app_instance, @@ -33,6 +35,18 @@ class PSDWindow(QtWidgets.QMainWindow): + PSDPlot: PSDPlotWidget + curveTable: PSDTableWidget + maxMeasurementTimeComboBox: QtWidgets.QComboBox + PSDAlgorithmComboBox: QtWidgets.QComboBox + startPSDPushButton: QtWidgets.QPushButton + stopPSDPushButton: QtWidgets.QPushButton + exportPSDPushButton: QtWidgets.QPushButton + importPSDPushButton: QtWidgets.QPushButton + deleteCurveButton: QtWidgets.QPushButton + PSDRunningContainer: QtWidgets.QWidget + PSDNotRunningContainer: QtWidgets.QGroupBox + def __init__(self, *args, **kwargs): super(PSDWindow, self).__init__(*args, **kwargs) uic.loadUi(UI_PATH / "psd_window.ui", self) @@ -46,21 +60,19 @@ def __init__(self, *args, **kwargs): self.data = {} self.complete_uids = [] - self.start_psd_button.clicked.connect(self.start_psd) - self.stop_psd_button.clicked.connect(self.stop_psd) + self.startPSDPushButton.clicked.connect(self.start_psd) + self.stopPSDPushButton.clicked.connect(self.stop_psd) - self.curve_table.show_or_hide_curve.connect( - self.psd_plot_widget.show_or_hide_curve - ) - self.delete_curve_button.clicked.connect(self.delete_curve) - self.export_psd_button.clicked.connect(self.export_psd) - self.import_psd_button.clicked.connect(self.import_psd) + self.curveTable.show_or_hide_curve.connect(self.PSDPlot.show_or_hide_curve) + self.deleteCurveButton.clicked.connect(self.delete_curve) + self.exportPSDPushButton.clicked.connect(self.export_psd) + self.importPSDPushButton.clicked.connect(self.import_psd) - self.maximum_measurement_time.currentIndexChanged.connect( - self.change_maximum_measurement_time + self.maxMeasurementTimeComboBox.currentIndexChanged.connect( + self.on_maximum_measurement_time_changed ) - self.psd_algorithm.currentIndexChanged.connect(self.change_psd_algorithm) + self.PSDAlgorithmComboBox.currentIndexChanged.connect(self.change_psd_algorithm) def on_connection_established(self): self.parameters = self.app.parameters @@ -75,19 +87,19 @@ def on_connection_established(self): param2ui( self.parameters.psd_acquisition_max_decimation, - self.maximum_measurement_time, + self.maxMeasurementTimeComboBox, lambda max_decimation: max_decimation - 12, ) - param2ui(self.parameters.psd_algorithm, self.psd_algorithm) + param2ui(self.parameters.psd_algorithm, self.PSDAlgorithmComboBox) def update_status(_): psd_running = self.parameters.psd_acquisition_running.value if psd_running: - self.container_psd_running.show() - self.container_psd_not_running.hide() + self.PSDRunningContainer.show() + self.PSDNotRunningContainer.hide() else: - self.container_psd_running.hide() - self.container_psd_not_running.show() + self.PSDRunningContainer.hide() + self.PSDNotRunningContainer.show() self.parameters.psd_acquisition_running.add_callback(update_status) @@ -97,7 +109,7 @@ def closeEvent(self, event, *args, **kwargs): event.ignore() self.hide() - def change_maximum_measurement_time(self, index): + def on_maximum_measurement_time_changed(self, index): self.parameters.psd_acquisition_max_decimation.value = 12 + index def change_psd_algorithm(self, index): @@ -130,8 +142,8 @@ def psd_data_received(self, data_pickled): else: color = self.colors[curve_uuid] - self.psd_plot_widget.plot_curve(curve_uuid, data["psds"], color) - self.curve_table.add_curve(curve_uuid, data, color) + self.PSDPlot.plot_curve(curve_uuid, data["psds"], color) + self.curveTable.add_curve(curve_uuid, data, color) self.data[curve_uuid] = data @@ -150,9 +162,9 @@ def start_pid_optimization(self): self.control.start_pid_optimization() def delete_curve(self): - uuid = self.curve_table.delete_selected_curve() + uuid = self.curveTable.delete_selected_curve() if uuid is not None: - self.psd_plot_widget.delete_curve(uuid) + self.PSDPlot.delete_curve(uuid) del self.data[uuid] def export_psd(self): diff --git a/linien-gui/linien_gui/ui/psd_window.ui b/linien-gui/linien_gui/ui/psd_window.ui index d35aec83..7b5db957 100644 --- a/linien-gui/linien_gui/ui/psd_window.ui +++ b/linien-gui/linien_gui/ui/psd_window.ui @@ -7,7 +7,7 @@ 0 0 1200 - 1000 + 625 @@ -16,7 +16,7 @@ - + 0 @@ -46,7 +46,7 @@ - + 5 @@ -161,13 +161,13 @@ - + Algorithm - + LPSD @@ -184,13 +184,13 @@ - + Single PSD measurement - + 75 @@ -209,7 +209,7 @@ - + @@ -232,7 +232,7 @@ - + background-color: #d40000; @@ -245,7 +245,7 @@ - + 0 @@ -290,7 +290,7 @@ - + Delete selected @@ -302,14 +302,14 @@ 6 - + Import traces - + Export traces From 8a38551270b016e07d638cc5deb07b96f92cacda Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Tue, 13 Aug 2024 16:07:51 +0200 Subject: [PATCH 16/30] make psd_algorithm parameter restorable --- linien-server/linien_server/parameters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linien-server/linien_server/parameters.py b/linien-server/linien_server/parameters.py index fc7abbe1..0c224c76 100644 --- a/linien-server/linien_server/parameters.py +++ b/linien-server/linien_server/parameters.py @@ -587,7 +587,7 @@ def __init__(self): self.psd_data_partial = Parameter(start=None) self.psd_data_complete = Parameter(start=None) - self.psd_algorithm = Parameter(start=PSDAlgorithm.LPSD) + self.psd_algorithm = Parameter(start=PSDAlgorithm.LPSD, restorable=True) self.psd_acquisition_running = Parameter(start=False) self.psd_optimization_running = Parameter(start=False) self.psd_acquisition_max_decimation = Parameter( From eac93a7bb9a4e5423722c66f2fbb1180af668ba5 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 29 Jul 2024 12:37:09 +0300 Subject: [PATCH 17/30] Make importlib-metadata dep upper version constraint higher --- linien-common/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linien-common/pyproject.toml b/linien-common/pyproject.toml index 6251f6f6..32509212 100644 --- a/linien-common/pyproject.toml +++ b/linien-common/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ requires-python = ">=3.8" dependencies = [ "appdirs>=1.4.4,<2.0", - "importlib_metadata>=2.1.3,<5.0", + "importlib_metadata>=2.1.3,<9.0", "numpy>=1.21.5,<2.0", "rpyc>=6.0,<7.0", "scipy>=1.8.0,<2.0", From 952ff0b6be6fc9553ee90a82183c2c76f31b7c2b Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 13:44:22 +0200 Subject: [PATCH 18/30] bump pyrp3 version to v2.1.0 --- linien-server/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index 20968c30..4bc5927c 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -27,7 +27,7 @@ dependencies = [ "fire>=0.6.0", "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", - "pyrp3>=2.0.1,<3.0;platform_machine=='armv7l'", + "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", "linien-common==2.1.0.dev0", ] From b59521f7a1c9fffb01fbe7be886b16f80ae190d3 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 14:11:36 +0200 Subject: [PATCH 19/30] fix bug preventing selection of PSD algorithm --- linien-gui/linien_gui/ui/psd_window.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/linien-gui/linien_gui/ui/psd_window.py b/linien-gui/linien_gui/ui/psd_window.py index 05eaea16..c349f955 100644 --- a/linien-gui/linien_gui/ui/psd_window.py +++ b/linien-gui/linien_gui/ui/psd_window.py @@ -112,10 +112,8 @@ def closeEvent(self, event, *args, **kwargs): def on_maximum_measurement_time_changed(self, index): self.parameters.psd_acquisition_max_decimation.value = 12 + index - def change_psd_algorithm(self, index): - self.parameters.psd_algorithm.value = [PSDAlgorithm.LPSD, PSDAlgorithm.WELCH][ - index - ] + def change_psd_algorithm(self, index: int) -> None: + self.parameters.psd_algorithm.value = list(PSDAlgorithm)[index] def psd_data_received(self, data_pickled): if data_pickled is None: From 10956e6dfcdb735f4e969c05b8320465dab3e532 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 14:15:19 +0200 Subject: [PATCH 20/30] fix PSD window layout --- linien-gui/linien_gui/ui/psd_window.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linien-gui/linien_gui/ui/psd_window.ui b/linien-gui/linien_gui/ui/psd_window.ui index 7b5db957..44b88fa2 100644 --- a/linien-gui/linien_gui/ui/psd_window.ui +++ b/linien-gui/linien_gui/ui/psd_window.ui @@ -7,7 +7,7 @@ 0 0 1200 - 625 + 1000 From bed8fdb71dac887f5b8181c25598029fe412817e Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 14:21:32 +0200 Subject: [PATCH 21/30] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3046ef22..fd13361b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * Fixed example code in the readme by @bleykauf in https://github.com/linien-org/linien/pull/420, thanks to @Andrew-wi for reporting this issue +* Fixed a bug preventing the selection of a PSD algorithm via the GUI by @bleykauf in https://github.com/linien-org/linien/pull/421, thanks to @martinssonh for reporting this issue ## [2.0.4] - 2024-05-30 From 439cf692dac9e81258b977d709408edab8e5dfdd Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 14:48:26 +0200 Subject: [PATCH 22/30] bump version to v2.1.0rc1 --- linien-client/pyproject.toml | 4 ++-- linien-common/pyproject.toml | 2 +- linien-gui/pyproject.toml | 4 ++-- linien-server/pyproject.toml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linien-client/pyproject.toml b/linien-client/pyproject.toml index 1fc8427a..bea2ce51 100644 --- a/linien-client/pyproject.toml +++ b/linien-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-client" -version = "2.1.0.dev0" +version = "2.1.0rc1" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -25,7 +25,7 @@ requires-python = ">=3.8" dependencies = [ "fabric>=3.2.2,<4.0", "typing_extensions>=4.5.0,<5.0", - "linien-common==2.1.0.dev0", + "linien-common==2.1.0rc1", ] [project.readme] diff --git a/linien-common/pyproject.toml b/linien-common/pyproject.toml index 8d6f9a0f..8b61afe7 100644 --- a/linien-common/pyproject.toml +++ b/linien-common/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-common" -version = "2.1.0.dev0" +version = "2.1.0rc1" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, diff --git a/linien-gui/pyproject.toml b/linien-gui/pyproject.toml index 80b34941..95562bc9 100644 --- a/linien-gui/pyproject.toml +++ b/linien-gui/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-gui" -version = "2.1.0.dev0" +version = "2.1.0rc1" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "PyQt5>=5.12.0,<6.0", "requests>=2.31.0,<3.0", "superqt>=0.2.3", - "linien_client==2.1.0.dev0", + "linien_client==2.1.0rc1", ] [project.readme] diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index 4bc5927c..3cde5703 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-server" -version = "2.1.0.dev0" +version = "2.1.0rc1" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", - "linien-common==2.1.0.dev0", + "linien-common==2.1.0rc1", ] [project.readme] From 14ff1f342cf3f92bac325ac65d9d7c209eb70cce Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 15:03:47 +0200 Subject: [PATCH 23/30] update author list --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9932379b..33dd4ba3 100644 --- a/README.md +++ b/README.md @@ -496,7 +496,9 @@ Linien ‒ User-friendly locking of lasers using RedPitaya (STEMlab 125-14) that Copyright © 2014-2015 Robert Jördens\ Copyright © 2018-2022 Benjamin Wiegand\ Copyright © 2021-2024 Bastian Leykauf\ -Copyright © 2022 Christian Freier +Copyright © 2022 Christian Freier\ +Copyright © 2023-2024 Doron Behar\ + Linien is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. From 937cd16cb5b12b9a80e4918f6f23c6ffbc385e97 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 15:23:46 +0200 Subject: [PATCH 24/30] simplify copyright statements --- gateware/bit2bin.py | 4 ++-- gateware/fpga_image_helper.py | 5 ++--- gateware/hw_platform.py | 6 ++---- gateware/linien_module.py | 7 ++----- gateware/logic/autolock.py | 5 ++--- gateware/logic/autolock_utils.py | 5 ++--- gateware/logic/chains.py | 6 ++---- gateware/logic/cordic.py | 6 ++---- gateware/logic/decimation.py | 5 ++--- gateware/logic/delta_sigma.py | 6 ++---- gateware/logic/filter.py | 6 ++---- gateware/logic/iir.py | 6 ++---- gateware/logic/limit.py | 6 ++---- gateware/logic/modulate.py | 6 ++---- gateware/logic/pid.py | 5 ++--- gateware/logic/sweep.py | 6 ++---- gateware/lowlevel/analog.py | 6 ++---- gateware/lowlevel/crg.py | 6 ++---- gateware/lowlevel/dna.py | 6 ++---- gateware/lowlevel/gpio.py | 6 ++---- gateware/lowlevel/pitaya_ps.py | 6 ++---- gateware/lowlevel/scopegen.py | 5 ++--- gateware/lowlevel/xadc.py | 6 ++---- linien-client/linien_client/__init__.py | 17 +++++++++++++++++ linien-client/linien_client/connection.py | 5 ++--- linien-client/linien_client/deploy.py | 5 ++--- linien-client/linien_client/device.py | 4 ++-- linien-client/linien_client/exceptions.py | 5 ++--- .../linien_client/remote_parameters.py | 5 ++--- linien-common/linien_common/common.py | 4 ++-- linien-common/linien_common/communication.py | 4 ++-- linien-common/linien_common/config.py | 5 ++--- linien-common/linien_common/influxdb.py | 4 ++-- linien-gui/linien_gui/__init__.py | 17 +++++++++++++++++ linien-gui/linien_gui/app.py | 4 ++-- linien-gui/linien_gui/config.py | 6 ++---- linien-gui/linien_gui/dialogs.py | 4 ++-- linien-gui/linien_gui/threads.py | 5 ++--- linien-gui/linien_gui/ui/device_manager.py | 5 ++--- linien-gui/linien_gui/ui/general_panel.py | 6 ++---- linien-gui/linien_gui/ui/lock_status_panel.py | 5 ++--- linien-gui/linien_gui/ui/locking_panel.py | 5 ++--- linien-gui/linien_gui/ui/logging_panel.py | 4 ++-- linien-gui/linien_gui/ui/main_window.py | 5 ++--- .../linien_gui/ui/modulation_sweep_panel.py | 5 ++--- linien-gui/linien_gui/ui/new_device_dialog.py | 4 ++-- linien-gui/linien_gui/ui/optimization_panel.py | 5 ++--- linien-gui/linien_gui/ui/plot_widget.py | 5 ++--- linien-gui/linien_gui/ui/psd_plot_widget.py | 5 ++--- linien-gui/linien_gui/ui/psd_table_widget.py | 5 ++--- linien-gui/linien_gui/ui/psd_window.py | 5 ++--- linien-gui/linien_gui/ui/right_panel.py | 5 ++--- linien-gui/linien_gui/ui/spectroscopy_panel.py | 5 ++--- linien-gui/linien_gui/ui/spin_box.py | 4 ++-- linien-gui/linien_gui/ui/sweep_control.py | 4 ++-- linien-gui/linien_gui/ui/version_checker.py | 5 ++--- linien-gui/linien_gui/ui/view_panel.py | 5 ++--- linien-gui/linien_gui/utils.py | 5 ++--- linien-server/linien_server/__init__.py | 17 +++++++++++++++++ linien-server/linien_server/acquisition.py | 5 ++--- .../autolock/algorithm_selection.py | 4 ++-- .../linien_server/autolock/autolock.py | 5 ++--- linien-server/linien_server/autolock/robust.py | 5 ++--- linien-server/linien_server/autolock/simple.py | 5 ++--- linien-server/linien_server/autolock/utils.py | 5 ++--- linien-server/linien_server/cli.py | 5 ++--- linien-server/linien_server/csr.py | 6 ++---- linien-server/linien_server/iir_coeffs.py | 6 ++---- linien-server/linien_server/influxdb.py | 4 ++-- linien-server/linien_server/mdio_tool.py | 4 ++-- linien-server/linien_server/noise_analysis.py | 5 ++--- .../linien_server/optimization/approach_line.py | 5 ++--- .../linien_server/optimization/engine.py | 5 ++--- .../linien_server/optimization/general.py | 5 ++--- .../linien_server/optimization/optimization.py | 5 ++--- .../linien_server/optimization/utils.py | 5 ++--- linien-server/linien_server/parameters.py | 6 ++---- linien-server/linien_server/registers.py | 6 ++---- linien-server/linien_server/server.py | 5 ++--- tests/test_algorithm_selection.py | 5 ++--- tests/test_approacher.py | 5 ++--- tests/test_common.py | 5 ++--- tests/test_delta_sigma.py | 5 ++--- tests/test_limit.py | 5 ++--- tests/test_modulate.py | 5 ++--- tests/test_optimizer_engines.py | 5 ++--- tests/test_optimizer_utils.py | 5 ++--- tests/test_pid.py | 5 ++--- tests/test_pid_transfer.py | 5 ++--- tests/test_robust_autolock.py | 5 ++--- tests/test_simple_autolock_cpu.py | 5 ++--- tests/test_simple_autolock_fpga.py | 5 ++--- tests/test_sweep.py | 5 ++--- 93 files changed, 231 insertions(+), 279 deletions(-) diff --git a/gateware/bit2bin.py b/gateware/bit2bin.py index 5c81cdc7..820ecf51 100644 --- a/gateware/bit2bin.py +++ b/gateware/bit2bin.py @@ -1,7 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/fpga_image_helper.py b/gateware/fpga_image_helper.py index e08aefc0..c3e20e70 100644 --- a/gateware/fpga_image_helper.py +++ b/gateware/fpga_image_helper.py @@ -1,8 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/hw_platform.py b/gateware/hw_platform.py index ca8f2579..0fcd12da 100644 --- a/gateware/hw_platform.py +++ b/gateware/hw_platform.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/linien_module.py b/gateware/linien_module.py index 16ca186c..5ea11bf1 100644 --- a/gateware/linien_module.py +++ b/gateware/linien_module.py @@ -1,10 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# Copyright 2022 Christian Freier -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/autolock.py b/gateware/logic/autolock.py index cc537316..907fb203 100644 --- a/gateware/logic/autolock.py +++ b/gateware/logic/autolock.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/autolock_utils.py b/gateware/logic/autolock_utils.py index a52e58aa..a9a8d055 100644 --- a/gateware/logic/autolock_utils.py +++ b/gateware/logic/autolock_utils.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/chains.py b/gateware/logic/chains.py index a8908498..be60af23 100644 --- a/gateware/logic/chains.py +++ b/gateware/logic/chains.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/cordic.py b/gateware/logic/cordic.py index 659b59aa..c85ca9f8 100644 --- a/gateware/logic/cordic.py +++ b/gateware/logic/cordic.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/decimation.py b/gateware/logic/decimation.py index c2ecc888..296f6488 100644 --- a/gateware/logic/decimation.py +++ b/gateware/logic/decimation.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/delta_sigma.py b/gateware/logic/delta_sigma.py index 23aec60d..ca3ef00a 100644 --- a/gateware/logic/delta_sigma.py +++ b/gateware/logic/delta_sigma.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/filter.py b/gateware/logic/filter.py index 62a0dcdb..90b06c4c 100644 --- a/gateware/logic/filter.py +++ b/gateware/logic/filter.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/iir.py b/gateware/logic/iir.py index 1aa5de7a..02679f0d 100644 --- a/gateware/logic/iir.py +++ b/gateware/logic/iir.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/limit.py b/gateware/logic/limit.py index e3c0315d..eac9bd8b 100644 --- a/gateware/logic/limit.py +++ b/gateware/logic/limit.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/modulate.py b/gateware/logic/modulate.py index c7503060..e0d59f88 100644 --- a/gateware/logic/modulate.py +++ b/gateware/logic/modulate.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/pid.py b/gateware/logic/pid.py index 4320f94e..52934a84 100644 --- a/gateware/logic/pid.py +++ b/gateware/logic/pid.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/logic/sweep.py b/gateware/logic/sweep.py index fd0b75d1..ad7d4309 100644 --- a/gateware/logic/sweep.py +++ b/gateware/logic/sweep.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/analog.py b/gateware/lowlevel/analog.py index b4e36171..cc607563 100644 --- a/gateware/lowlevel/analog.py +++ b/gateware/lowlevel/analog.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/crg.py b/gateware/lowlevel/crg.py index 905b7520..ae9bafb9 100644 --- a/gateware/lowlevel/crg.py +++ b/gateware/lowlevel/crg.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/dna.py b/gateware/lowlevel/dna.py index a74aa423..aff4c68f 100644 --- a/gateware/lowlevel/dna.py +++ b/gateware/lowlevel/dna.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/gpio.py b/gateware/lowlevel/gpio.py index 3d38859d..de8ca793 100644 --- a/gateware/lowlevel/gpio.py +++ b/gateware/lowlevel/gpio.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/pitaya_ps.py b/gateware/lowlevel/pitaya_ps.py index a6508f5b..984fe242 100644 --- a/gateware/lowlevel/pitaya_ps.py +++ b/gateware/lowlevel/pitaya_ps.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/scopegen.py b/gateware/lowlevel/scopegen.py index d4a0c44a..b62fda6f 100644 --- a/gateware/lowlevel/scopegen.py +++ b/gateware/lowlevel/scopegen.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/gateware/lowlevel/xadc.py b/gateware/lowlevel/xadc.py index 352aa86b..de06d319 100644 --- a/gateware/lowlevel/xadc.py +++ b/gateware/lowlevel/xadc.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-client/linien_client/__init__.py b/linien-client/linien_client/__init__.py index 3721fe42..022cad8b 100644 --- a/linien-client/linien_client/__init__.py +++ b/linien-client/linien_client/__init__.py @@ -1,3 +1,20 @@ +# This file is part of Linien and based on redpid. +# +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# +# Linien is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Linien is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Linien. If not, see . + import importlib.metadata import logging from logging.handlers import RotatingFileHandler diff --git a/linien-client/linien_client/connection.py b/linien-client/linien_client/connection.py index 3fa07b17..c6de5780 100644 --- a/linien-client/linien_client/connection.py +++ b/linien-client/linien_client/connection.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-client/linien_client/deploy.py b/linien-client/linien_client/deploy.py index d028b52b..df6683fe 100644 --- a/linien-client/linien_client/deploy.py +++ b/linien-client/linien_client/deploy.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-client/linien_client/device.py b/linien-client/linien_client/device.py index 559933a1..ae9ee374 100644 --- a/linien-client/linien_client/device.py +++ b/linien-client/linien_client/device.py @@ -1,7 +1,7 @@ -# Copyright 2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-client/linien_client/exceptions.py b/linien-client/linien_client/exceptions.py index 7ecb3c00..dd96628e 100644 --- a/linien-client/linien_client/exceptions.py +++ b/linien-client/linien_client/exceptions.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-client/linien_client/remote_parameters.py b/linien-client/linien_client/remote_parameters.py index e8756383..a81f9bf6 100644 --- a/linien-client/linien_client/remote_parameters.py +++ b/linien-client/linien_client/remote_parameters.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-common/linien_common/common.py b/linien-common/linien_common/common.py index a1044174..854d776f 100644 --- a/linien-common/linien_common/common.py +++ b/linien-common/linien_common/common.py @@ -1,7 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-common/linien_common/communication.py b/linien-common/linien_common/communication.py index e35d4d6e..81b43dd3 100644 --- a/linien-common/linien_common/communication.py +++ b/linien-common/linien_common/communication.py @@ -1,7 +1,7 @@ -# Copyright 2023-2024 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-common/linien_common/config.py b/linien-common/linien_common/config.py index 0728aff5..6ba92e67 100644 --- a/linien-common/linien_common/config.py +++ b/linien-common/linien_common/config.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-common/linien_common/influxdb.py b/linien-common/linien_common/influxdb.py index 24557af6..e17b5109 100644 --- a/linien-common/linien_common/influxdb.py +++ b/linien-common/linien_common/influxdb.py @@ -1,7 +1,7 @@ -# Copyright 2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/__init__.py b/linien-gui/linien_gui/__init__.py index 7f5d7649..da24c9a6 100644 --- a/linien-gui/linien_gui/__init__.py +++ b/linien-gui/linien_gui/__init__.py @@ -1,3 +1,20 @@ +# This file is part of Linien and based on redpid. +# +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# +# Linien is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Linien is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Linien. If not, see . + import importlib.metadata import logging from logging.handlers import RotatingFileHandler diff --git a/linien-gui/linien_gui/app.py b/linien-gui/linien_gui/app.py index abda7037..d7561feb 100644 --- a/linien-gui/linien_gui/app.py +++ b/linien-gui/linien_gui/app.py @@ -1,7 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/config.py b/linien-gui/linien_gui/config.py index eb065a14..69870d36 100644 --- a/linien-gui/linien_gui/config.py +++ b/linien-gui/linien_gui/config.py @@ -1,9 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2023 Bastian Leykauf - -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/dialogs.py b/linien-gui/linien_gui/dialogs.py index 7fbf0049..1283e611 100644 --- a/linien-gui/linien_gui/dialogs.py +++ b/linien-gui/linien_gui/dialogs.py @@ -1,7 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/threads.py b/linien-gui/linien_gui/threads.py index bab3963d..dd43d77b 100644 --- a/linien-gui/linien_gui/threads.py +++ b/linien-gui/linien_gui/threads.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/device_manager.py b/linien-gui/linien_gui/ui/device_manager.py index 410996d8..e5848259 100644 --- a/linien-gui/linien_gui/ui/device_manager.py +++ b/linien-gui/linien_gui/ui/device_manager.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/general_panel.py b/linien-gui/linien_gui/ui/general_panel.py index 53ff7ed1..cad2d918 100644 --- a/linien-gui/linien_gui/ui/general_panel.py +++ b/linien-gui/linien_gui/ui/general_panel.py @@ -1,9 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# Copyright 2022 Christian Freier -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/lock_status_panel.py b/linien-gui/linien_gui/ui/lock_status_panel.py index bb11b259..07e3cb4c 100644 --- a/linien-gui/linien_gui/ui/lock_status_panel.py +++ b/linien-gui/linien_gui/ui/lock_status_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/locking_panel.py b/linien-gui/linien_gui/ui/locking_panel.py index 86d8c17a..9fc23623 100644 --- a/linien-gui/linien_gui/ui/locking_panel.py +++ b/linien-gui/linien_gui/ui/locking_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/logging_panel.py b/linien-gui/linien_gui/ui/logging_panel.py index 6256abcd..2fa1f732 100644 --- a/linien-gui/linien_gui/ui/logging_panel.py +++ b/linien-gui/linien_gui/ui/logging_panel.py @@ -1,7 +1,7 @@ -# Copyright 2022 Bastian Leykauf -# # This file is part of Linien. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/main_window.py b/linien-gui/linien_gui/ui/main_window.py index 5d6ad3c9..dad465e2 100644 --- a/linien-gui/linien_gui/ui/main_window.py +++ b/linien-gui/linien_gui/ui/main_window.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/modulation_sweep_panel.py b/linien-gui/linien_gui/ui/modulation_sweep_panel.py index 4a48b820..4013cc6f 100644 --- a/linien-gui/linien_gui/ui/modulation_sweep_panel.py +++ b/linien-gui/linien_gui/ui/modulation_sweep_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/new_device_dialog.py b/linien-gui/linien_gui/ui/new_device_dialog.py index 6a8cc977..6c5e57e3 100644 --- a/linien-gui/linien_gui/ui/new_device_dialog.py +++ b/linien-gui/linien_gui/ui/new_device_dialog.py @@ -1,7 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/optimization_panel.py b/linien-gui/linien_gui/ui/optimization_panel.py index 740927ed..6bf9e4cb 100644 --- a/linien-gui/linien_gui/ui/optimization_panel.py +++ b/linien-gui/linien_gui/ui/optimization_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index 8f845bac..dbe6c659 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/psd_plot_widget.py b/linien-gui/linien_gui/ui/psd_plot_widget.py index 4689a9c1..09c3ba1e 100644 --- a/linien-gui/linien_gui/ui/psd_plot_widget.py +++ b/linien-gui/linien_gui/ui/psd_plot_widget.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2024 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/psd_table_widget.py b/linien-gui/linien_gui/ui/psd_table_widget.py index 48d99eeb..6a3d2f80 100644 --- a/linien-gui/linien_gui/ui/psd_table_widget.py +++ b/linien-gui/linien_gui/ui/psd_table_widget.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/psd_window.py b/linien-gui/linien_gui/ui/psd_window.py index c349f955..7e6bd047 100644 --- a/linien-gui/linien_gui/ui/psd_window.py +++ b/linien-gui/linien_gui/ui/psd_window.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2024 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/right_panel.py b/linien-gui/linien_gui/ui/right_panel.py index d66f132c..86dc4e5f 100644 --- a/linien-gui/linien_gui/ui/right_panel.py +++ b/linien-gui/linien_gui/ui/right_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/spectroscopy_panel.py b/linien-gui/linien_gui/ui/spectroscopy_panel.py index b4c76aa3..0fffee3c 100644 --- a/linien-gui/linien_gui/ui/spectroscopy_panel.py +++ b/linien-gui/linien_gui/ui/spectroscopy_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/spin_box.py b/linien-gui/linien_gui/ui/spin_box.py index f2884d9a..91747ecd 100644 --- a/linien-gui/linien_gui/ui/spin_box.py +++ b/linien-gui/linien_gui/ui/spin_box.py @@ -1,6 +1,6 @@ -# Copyright 2022 Bastian Leykauf +# This file is part of Linien and based on redpid. # -# This file is part of Linien. +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) # # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/linien-gui/linien_gui/ui/sweep_control.py b/linien-gui/linien_gui/ui/sweep_control.py index 61f41122..7d2bb2d4 100644 --- a/linien-gui/linien_gui/ui/sweep_control.py +++ b/linien-gui/linien_gui/ui/sweep_control.py @@ -1,7 +1,7 @@ -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/version_checker.py b/linien-gui/linien_gui/ui/version_checker.py index fa4bfa7d..8433e115 100644 --- a/linien-gui/linien_gui/ui/version_checker.py +++ b/linien-gui/linien_gui/ui/version_checker.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/ui/view_panel.py b/linien-gui/linien_gui/ui/view_panel.py index 2dfae343..beca4743 100644 --- a/linien-gui/linien_gui/ui/view_panel.py +++ b/linien-gui/linien_gui/ui/view_panel.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-gui/linien_gui/utils.py b/linien-gui/linien_gui/utils.py index 1e4bd360..37224d29 100644 --- a/linien-gui/linien_gui/utils.py +++ b/linien-gui/linien_gui/utils.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/__init__.py b/linien-server/linien_server/__init__.py index a12da2ee..b578ef67 100644 --- a/linien-server/linien_server/__init__.py +++ b/linien-server/linien_server/__init__.py @@ -1,3 +1,20 @@ +# This file is part of Linien and based on redpid. +# +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# +# Linien is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Linien is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Linien. If not, see . + import logging from logging.handlers import RotatingFileHandler diff --git a/linien-server/linien_server/acquisition.py b/linien-server/linien_server/acquisition.py index 39a6921a..8f1bb6ac 100644 --- a/linien-server/linien_server/acquisition.py +++ b/linien-server/linien_server/acquisition.py @@ -1,8 +1,7 @@ -# Copyright 2018-2023 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/autolock/algorithm_selection.py b/linien-server/linien_server/autolock/algorithm_selection.py index 54884f89..17f438f9 100644 --- a/linien-server/linien_server/autolock/algorithm_selection.py +++ b/linien-server/linien_server/autolock/algorithm_selection.py @@ -1,7 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/autolock/autolock.py b/linien-server/linien_server/autolock/autolock.py index feecf4d7..07507cd8 100644 --- a/linien-server/linien_server/autolock/autolock.py +++ b/linien-server/linien_server/autolock/autolock.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/autolock/robust.py b/linien-server/linien_server/autolock/robust.py index faaf8f9a..67cd0bcf 100644 --- a/linien-server/linien_server/autolock/robust.py +++ b/linien-server/linien_server/autolock/robust.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/autolock/simple.py b/linien-server/linien_server/autolock/simple.py index 11d8eb96..efac90d6 100644 --- a/linien-server/linien_server/autolock/simple.py +++ b/linien-server/linien_server/autolock/simple.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/autolock/utils.py b/linien-server/linien_server/autolock/utils.py index 3d788256..eab8a410 100644 --- a/linien-server/linien_server/autolock/utils.py +++ b/linien-server/linien_server/autolock/utils.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/cli.py b/linien-server/linien_server/cli.py index b7a53bde..98539b25 100644 --- a/linien-server/linien_server/cli.py +++ b/linien-server/linien_server/cli.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/csr.py b/linien-server/linien_server/csr.py index 8fbab436..ce49f996 100644 --- a/linien-server/linien_server/csr.py +++ b/linien-server/linien_server/csr.py @@ -1,9 +1,7 @@ -# Copyright 2014-2015 Robert Jördens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/iir_coeffs.py b/linien-server/linien_server/iir_coeffs.py index 8d48cdc8..f6bcc96c 100644 --- a/linien-server/linien_server/iir_coeffs.py +++ b/linien-server/linien_server/iir_coeffs.py @@ -1,8 +1,6 @@ -# Copyright 2014-2015 Robert Jordens -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf +# This file is part of Linien and based on redpid. # -# This file is part of Linien. +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) # # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/linien-server/linien_server/influxdb.py b/linien-server/linien_server/influxdb.py index e15be813..6b633d4b 100644 --- a/linien-server/linien_server/influxdb.py +++ b/linien-server/linien_server/influxdb.py @@ -1,7 +1,7 @@ -# Copyright 2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/mdio_tool.py b/linien-server/linien_server/mdio_tool.py index 2b96e938..6f2cf0f9 100644 --- a/linien-server/linien_server/mdio_tool.py +++ b/linien-server/linien_server/mdio_tool.py @@ -1,7 +1,7 @@ -# Copyright 2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/noise_analysis.py b/linien-server/linien_server/noise_analysis.py index 1dff054a..acf91ddc 100644 --- a/linien-server/linien_server/noise_analysis.py +++ b/linien-server/linien_server/noise_analysis.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/optimization/approach_line.py b/linien-server/linien_server/optimization/approach_line.py index e6d25735..5f9c3ca1 100644 --- a/linien-server/linien_server/optimization/approach_line.py +++ b/linien-server/linien_server/optimization/approach_line.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/optimization/engine.py b/linien-server/linien_server/optimization/engine.py index 22d587e8..a7006094 100644 --- a/linien-server/linien_server/optimization/engine.py +++ b/linien-server/linien_server/optimization/engine.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/optimization/general.py b/linien-server/linien_server/optimization/general.py index 1a49266c..c2de8859 100644 --- a/linien-server/linien_server/optimization/general.py +++ b/linien-server/linien_server/optimization/general.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/optimization/optimization.py b/linien-server/linien_server/optimization/optimization.py index 392de73f..a42e837d 100644 --- a/linien-server/linien_server/optimization/optimization.py +++ b/linien-server/linien_server/optimization/optimization.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/optimization/utils.py b/linien-server/linien_server/optimization/utils.py index 5f0d7c98..7bdc071f 100644 --- a/linien-server/linien_server/optimization/utils.py +++ b/linien-server/linien_server/optimization/utils.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/parameters.py b/linien-server/linien_server/parameters.py index 0c224c76..12f16ed6 100644 --- a/linien-server/linien_server/parameters.py +++ b/linien-server/linien_server/parameters.py @@ -1,9 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# Copyright 2023 Christian Freier -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/registers.py b/linien-server/linien_server/registers.py index d29f8cb3..365c2540 100644 --- a/linien-server/linien_server/registers.py +++ b/linien-server/linien_server/registers.py @@ -1,9 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# Copyright 2022 Christian Freier -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/linien-server/linien_server/server.py b/linien-server/linien_server/server.py index f2729c2b..99a2cc30 100644 --- a/linien-server/linien_server/server.py +++ b/linien-server/linien_server/server.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2023 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_algorithm_selection.py b/tests/test_algorithm_selection.py index 4dc595ab..5e2fdf62 100644 --- a/tests/test_algorithm_selection.py +++ b/tests/test_algorithm_selection.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_approacher.py b/tests/test_approacher.py index 1aef3eca..b5a6d68c 100644 --- a/tests/test_approacher.py +++ b/tests/test_approacher.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_common.py b/tests/test_common.py index a7e4e1ce..50acdee9 100644 --- a/tests/test_common.py +++ b/tests/test_common.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_delta_sigma.py b/tests/test_delta_sigma.py index 8f9623fd..f648ae01 100644 --- a/tests/test_delta_sigma.py +++ b/tests/test_delta_sigma.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_limit.py b/tests/test_limit.py index 9d38b372..7194ffa8 100644 --- a/tests/test_limit.py +++ b/tests/test_limit.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_modulate.py b/tests/test_modulate.py index ee8ff29f..9349811d 100644 --- a/tests/test_modulate.py +++ b/tests/test_modulate.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_optimizer_engines.py b/tests/test_optimizer_engines.py index fa7a890b..e1940017 100644 --- a/tests/test_optimizer_engines.py +++ b/tests/test_optimizer_engines.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_optimizer_utils.py b/tests/test_optimizer_utils.py index 591910c8..677e0286 100644 --- a/tests/test_optimizer_utils.py +++ b/tests/test_optimizer_utils.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_pid.py b/tests/test_pid.py index ed745aba..4ac2709d 100644 --- a/tests/test_pid.py +++ b/tests/test_pid.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_pid_transfer.py b/tests/test_pid_transfer.py index b5f8facd..cb3e0747 100644 --- a/tests/test_pid_transfer.py +++ b/tests/test_pid_transfer.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_robust_autolock.py b/tests/test_robust_autolock.py index 5d003242..389f8983 100644 --- a/tests/test_robust_autolock.py +++ b/tests/test_robust_autolock.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_simple_autolock_cpu.py b/tests/test_simple_autolock_cpu.py index 681f661b..6928f0fb 100644 --- a/tests/test_simple_autolock_cpu.py +++ b/tests/test_simple_autolock_cpu.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_simple_autolock_fpga.py b/tests/test_simple_autolock_fpga.py index c9acc965..b1c55d29 100644 --- a/tests/test_simple_autolock_fpga.py +++ b/tests/test_simple_autolock_fpga.py @@ -1,8 +1,7 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf -# # This file is part of Linien and based on redpid. # +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) +# # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or diff --git a/tests/test_sweep.py b/tests/test_sweep.py index bf5f3ced..b39d0667 100644 --- a/tests/test_sweep.py +++ b/tests/test_sweep.py @@ -1,7 +1,6 @@ -# Copyright 2018-2022 Benjamin Wiegand -# Copyright 2021-2022 Bastian Leykauf +# This file is part of Linien and based on redpid.# # -# This file is part of Linien and based on redpid. +# Copyright (C) 2016-2024 Linien Authors (https://github.com/linien-org/linien#license) # # Linien is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by From d0f70fc6db42d997ed1946d64d3984360f32247b Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 15:34:56 +0200 Subject: [PATCH 25/30] update changelog --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd13361b..7d80aa98 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [2.1.0] ### Added * Show differences when local and remote parameters do not match by @bleykauf in https://github.com/linien-org/linien/pull/400 @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed * Switched to Tableau color scheme and make colors consistent, i.e. signals have the same color while sweeping and when locked. By @bleykauf in https://github.com/linien-org/linien/pull/419. +* Increase upper version constraint for `importlib-metadata` by @doronbehar in https://github.com/linien-org/linien/pull/416 ### Fixed @@ -243,7 +244,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **Bug fixes and performance improvements** -[Unreleased]: https://github.com/linien-org/linien/compare/v2.0.4...HEAD +[2.1.0]: https://github.com/linien-org/linien/compare/v2.0.4...v2.1.0 [2.0.4]: https://github.com/linien-org/linien/compare/v2.0.3...v2.0.4 [2.0.3]: https://github.com/linien-org/linien/compare/v2.0.2...v2.0.3 [2.0.2]: https://github.com/linien-org/linien/compare/v2.0.1...v2.0.2 From b5d0abd5e1c771c96242c31295249d9999866a30 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Wed, 14 Aug 2024 15:38:08 +0200 Subject: [PATCH 26/30] bump version to 2.1.0rc2 --- linien-client/pyproject.toml | 4 ++-- linien-common/pyproject.toml | 2 +- linien-gui/pyproject.toml | 4 ++-- linien-server/pyproject.toml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linien-client/pyproject.toml b/linien-client/pyproject.toml index bea2ce51..def4f441 100644 --- a/linien-client/pyproject.toml +++ b/linien-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-client" -version = "2.1.0rc1" +version = "2.1.0rc2" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -25,7 +25,7 @@ requires-python = ">=3.8" dependencies = [ "fabric>=3.2.2,<4.0", "typing_extensions>=4.5.0,<5.0", - "linien-common==2.1.0rc1", + "linien-common==2.1.0rc2", ] [project.readme] diff --git a/linien-common/pyproject.toml b/linien-common/pyproject.toml index 8b61afe7..8dd98480 100644 --- a/linien-common/pyproject.toml +++ b/linien-common/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-common" -version = "2.1.0rc1" +version = "2.1.0rc2" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, diff --git a/linien-gui/pyproject.toml b/linien-gui/pyproject.toml index 95562bc9..1fa963da 100644 --- a/linien-gui/pyproject.toml +++ b/linien-gui/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-gui" -version = "2.1.0rc1" +version = "2.1.0rc2" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "PyQt5>=5.12.0,<6.0", "requests>=2.31.0,<3.0", "superqt>=0.2.3", - "linien_client==2.1.0rc1", + "linien_client==2.1.0rc2", ] [project.readme] diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index 3cde5703..ed440124 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-server" -version = "2.1.0rc1" +version = "2.1.0rc2" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", - "linien-common==2.1.0rc1", + "linien-common==2.1.0rc2", ] [project.readme] From fe4386ad645fcbff3b3fb74258326fa7e5cff44f Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Thu, 15 Aug 2024 11:36:13 +0200 Subject: [PATCH 27/30] bump version to v2.1.0 --- linien-client/pyproject.toml | 4 ++-- linien-common/pyproject.toml | 2 +- linien-gui/pyproject.toml | 4 ++-- linien-server/pyproject.toml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linien-client/pyproject.toml b/linien-client/pyproject.toml index def4f441..35a89a36 100644 --- a/linien-client/pyproject.toml +++ b/linien-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-client" -version = "2.1.0rc2" +version = "2.1.0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -25,7 +25,7 @@ requires-python = ">=3.8" dependencies = [ "fabric>=3.2.2,<4.0", "typing_extensions>=4.5.0,<5.0", - "linien-common==2.1.0rc2", + "linien-common==2.1.0", ] [project.readme] diff --git a/linien-common/pyproject.toml b/linien-common/pyproject.toml index 8dd98480..5ab51d34 100644 --- a/linien-common/pyproject.toml +++ b/linien-common/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-common" -version = "2.1.0rc2" +version = "2.1.0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, diff --git a/linien-gui/pyproject.toml b/linien-gui/pyproject.toml index 1fa963da..ee60c071 100644 --- a/linien-gui/pyproject.toml +++ b/linien-gui/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-gui" -version = "2.1.0rc2" +version = "2.1.0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "PyQt5>=5.12.0,<6.0", "requests>=2.31.0,<3.0", "superqt>=0.2.3", - "linien_client==2.1.0rc2", + "linien_client==2.1.0", ] [project.readme] diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index ed440124..fa1bedee 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-server" -version = "2.1.0rc2" +version = "2.1.0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", - "linien-common==2.1.0rc2", + "linien-common==2.1.0", ] [project.readme] From 704966cbf256d610e55bc63ddab42c5695b8e904 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Thu, 15 Aug 2024 14:33:47 +0200 Subject: [PATCH 28/30] bump version to v2.2.0.dev0 --- CHANGELOG.md | 3 +++ linien-client/pyproject.toml | 4 ++-- linien-common/pyproject.toml | 2 +- linien-gui/pyproject.toml | 4 ++-- linien-server/pyproject.toml | 4 ++-- 5 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d80aa98..d4d97b87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + ## [2.1.0] ### Added @@ -244,6 +246,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * **Bug fixes and performance improvements** +[Unreleased]: https://github.com/linien-org/linien/compare/v2.1.0...HEAD [2.1.0]: https://github.com/linien-org/linien/compare/v2.0.4...v2.1.0 [2.0.4]: https://github.com/linien-org/linien/compare/v2.0.3...v2.0.4 [2.0.3]: https://github.com/linien-org/linien/compare/v2.0.2...v2.0.3 diff --git a/linien-client/pyproject.toml b/linien-client/pyproject.toml index 35a89a36..081c99dc 100644 --- a/linien-client/pyproject.toml +++ b/linien-client/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-client" -version = "2.1.0" +version = "2.2.0.dev0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -25,7 +25,7 @@ requires-python = ">=3.8" dependencies = [ "fabric>=3.2.2,<4.0", "typing_extensions>=4.5.0,<5.0", - "linien-common==2.1.0", + "linien-common==2.2.0.dev0", ] [project.readme] diff --git a/linien-common/pyproject.toml b/linien-common/pyproject.toml index 5ab51d34..01c38f23 100644 --- a/linien-common/pyproject.toml +++ b/linien-common/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-common" -version = "2.1.0" +version = "2.2.0.dev0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, diff --git a/linien-gui/pyproject.toml b/linien-gui/pyproject.toml index ee60c071..40d20528 100644 --- a/linien-gui/pyproject.toml +++ b/linien-gui/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-gui" -version = "2.1.0" +version = "2.2.0.dev0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "PyQt5>=5.12.0,<6.0", "requests>=2.31.0,<3.0", "superqt>=0.2.3", - "linien_client==2.1.0", + "linien_client==2.2.0.dev0", ] [project.readme] diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index fa1bedee..04c7cf81 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "linien-server" -version = "2.1.0" +version = "2.2.0.dev0" authors = [ { name = "Benjamin Wiegand", email = "benjamin.wiegand@physik.hu-berlin.de" }, { name = "Bastian Leykauf", email = "leykauf@physik.hu-berlin.de" }, @@ -28,7 +28,7 @@ dependencies = [ "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", - "linien-common==2.1.0", + "linien-common==221.0.dev0", ] [project.readme] From 7e9e01b1e4eb5a1392a069b3ad4e8aa95ceab7ba Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Fri, 16 Aug 2024 08:29:15 +0200 Subject: [PATCH 29/30] fix version number --- linien-server/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linien-server/pyproject.toml b/linien-server/pyproject.toml index 04c7cf81..83784c32 100644 --- a/linien-server/pyproject.toml +++ b/linien-server/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "influxdb-client[ciso]>=1.9,<2.0", "pylpsd>=0.1.4", "pyrp3>=2.1.0,<3.0;platform_machine=='armv7l'", - "linien-common==221.0.dev0", + "linien-common==2.2.0.dev0", ] [project.readme] From 78220224625fb6bd3a104a852dde99bcd9926d71 Mon Sep 17 00:00:00 2001 From: Bastian Leykauf Date: Mon, 19 Aug 2024 14:39:05 +0200 Subject: [PATCH 30/30] some improvements to typehinting --- linien-gui/linien_gui/ui/locking_panel.py | 2 +- linien-gui/linien_gui/ui/plot_widget.py | 6 ++++-- linien-gui/linien_gui/ui/psd_window.py | 12 ++++++------ linien-server/linien_server/noise_analysis.py | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/linien-gui/linien_gui/ui/locking_panel.py b/linien-gui/linien_gui/ui/locking_panel.py index 9fc23623..2053a22a 100644 --- a/linien-gui/linien_gui/ui/locking_panel.py +++ b/linien-gui/linien_gui/ui/locking_panel.py @@ -161,7 +161,7 @@ def start_manual_lock(self): self.parameters.autolock_mode.value = AutolockMode.SIMPLE self.parameters.autolock_target_position.value = 0 self.control.write_registers() - self.control.start_lock() + self.control.exposed_start_lock() def auto_offset_changed(self): self.parameters.autolock_determine_offset.value = int( diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py index dbe6c659..8f93f385 100644 --- a/linien-gui/linien_gui/ui/plot_widget.py +++ b/linien-gui/linien_gui/ui/plot_widget.py @@ -306,7 +306,7 @@ def mouseReleaseEvent(self, event): last_combined_error_signal = self.last_plot_data[2] self.parameters.autolock_selection.value = False - self.control.start_autolock( + self.control.exposed_start_autolock( # we pickle it here because otherwise a netref is # transmitted which blocks the autolock *sorted([x0, x]), @@ -336,7 +336,9 @@ def mouseReleaseEvent(self, event): ] self.parameters.optimization_selection.value = False points = sorted([int(x0), int(x)]) - self.control.start_optimization(*points, pickle.dumps(spectrum)) + self.control.exposed_start_optimization( + *points, pickle.dumps(spectrum) + ) self.overlay.setVisible(False) self.touch_start = None diff --git a/linien-gui/linien_gui/ui/psd_window.py b/linien-gui/linien_gui/ui/psd_window.py index 7e6bd047..0f07b9ee 100644 --- a/linien-gui/linien_gui/ui/psd_window.py +++ b/linien-gui/linien_gui/ui/psd_window.py @@ -78,10 +78,10 @@ def on_connection_established(self): self.control = self.app.control self.parameters.psd_data_partial.add_callback( - self.psd_data_received, + self.on_psd_data_received, ) self.parameters.psd_data_complete.add_callback( - self.psd_data_received, + self.on_psd_data_received, ) param2ui( @@ -114,7 +114,7 @@ def on_maximum_measurement_time_changed(self, index): def change_psd_algorithm(self, index: int) -> None: self.parameters.psd_algorithm.value = list(PSDAlgorithm)[index] - def psd_data_received(self, data_pickled): + def on_psd_data_received(self, data_pickled): if data_pickled is None: return @@ -148,7 +148,7 @@ def start_psd(self): if not self.parameters.lock.value: return error_dialog(self, """Laser has to be locked for PSD measurement!""") - self.control.start_psd_acquisition() + self.control.exposed_start_psd_acquisition() def stop_psd(self): if self.parameters.task.value is not None: @@ -156,7 +156,7 @@ def stop_psd(self): self.parameters.task.value = None def start_pid_optimization(self): - self.control.start_pid_optimization() + self.control.exposed_start_pid_optimization() def delete_curve(self): uuid = self.curveTable.delete_selected_curve() @@ -207,4 +207,4 @@ def import_psd(self): assert "linien-version" in data, "invalid parameter file" for uuid, psd_data in data["psd-data"].items(): - self.psd_data_received(pickle.dumps(psd_data)) + self.on_psd_data_received(pickle.dumps(psd_data)) diff --git a/linien-server/linien_server/noise_analysis.py b/linien-server/linien_server/noise_analysis.py index acf91ddc..cdeaddea 100644 --- a/linien-server/linien_server/noise_analysis.py +++ b/linien-server/linien_server/noise_analysis.py @@ -47,8 +47,8 @@ def calculate_psd( :return: One-sided power spectral density. """ - # at beginning or end of signal, we sometimes have more glitches --> ignore - # them (200 points less @ 16384 points doesn't hurt much) + # at beginning or end of signal, we sometimes have more glitches --> ignore them + # (200 points less @ 16384 points doesn't hurt much) sig = sig[100:-100] num_pts = 256