From 62ff2cb04839bc40d81f766b6231140d6c1449d6 Mon Sep 17 00:00:00 2001 From: linuswck Date: Tue, 28 Jan 2025 16:32:11 +0800 Subject: [PATCH] gui: specified range width for graphs --- pykirdy/kirdy_qt.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pykirdy/kirdy_qt.py b/pykirdy/kirdy_qt.py index ffaf9a4..687b7d6 100644 --- a/pykirdy/kirdy_qt.py +++ b/pykirdy/kirdy_qt.py @@ -202,8 +202,8 @@ class Graphs: pd_mon_pwr_axis = LiveAxis('left', text="Power", units="W") pd_mon_pwr_axis.showLabel() - - pd_mon_pwr_graph.y_range_controller = LiveAxisRange(y_range_width=0.0005, y_bound=[0.0, float("inf")]) + # Laser Diode Power Reading Graph Range Width: 5mW + pd_mon_pwr_graph.y_range_controller = LiveAxisRange(y_range_width=0.005, y_bound=[0.0, float("inf")]) pd_mon_pwr_graph.setAxisItems({'left': pd_mon_pwr_axis}) pd_mon_pwr_graph.addItem(self._pd_mon_pwr_plot) self.pd_mon_pwr_connector = DataConnector(self._pd_mon_pwr_plot, plot_rate=10.0, update_rate=10.0, max_points=self.max_samples) @@ -211,7 +211,8 @@ class Graphs: tec_temp_axis = LiveAxis('left', text="Temperature", units="℃") tec_temp_axis.showLabel() - tec_temp_graph.y_range_controller = LiveAxisRange(y_range_width=0.002) + # TEC Temperature Reading Graph Range Width: 2.5mK + tec_temp_graph.y_range_controller = LiveAxisRange(y_range_width=0.0025) tec_temp_graph.setAxisItems({'left': tec_temp_axis}) tec_temp_graph.addItem(self._tec_setpoint_plot) tec_temp_graph.addItem(self._tec_temp_plot) @@ -225,6 +226,7 @@ class Graphs: tec_i_graph.addLegend(brush=(50, 50, 200, 150)) tec_i_graph.addItem(self._tec_i_target_plot) tec_i_graph.addItem(self._tec_i_measure_plot) + # TEC Output Current Reading Graph Range Width: 50mA tec_i_graph.y_range_controller = LiveAxisRange(y_range_width=0.05) self.tec_i_target_connector = DataConnector(self._tec_i_target_plot, plot_rate=10.0, update_rate=10.0, max_points=self.max_samples) self.tec_i_measure_connector = DataConnector(self._tec_i_measure_plot, plot_rate=10.0, update_rate=10.0, max_points=self.max_samples)