gui: specified range width for graphs

This commit is contained in:
linuswck 2025-01-28 16:32:11 +08:00
parent 749f19b105
commit 62ff2cb048

View File

@ -202,8 +202,8 @@ class Graphs:
pd_mon_pwr_axis = LiveAxis('left', text="Power", units="W") pd_mon_pwr_axis = LiveAxis('left', text="Power", units="W")
pd_mon_pwr_axis.showLabel() pd_mon_pwr_axis.showLabel()
# Laser Diode Power Reading Graph Range Width: 5mW
pd_mon_pwr_graph.y_range_controller = LiveAxisRange(y_range_width=0.0005, y_bound=[0.0, float("inf")]) 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.setAxisItems({'left': pd_mon_pwr_axis})
pd_mon_pwr_graph.addItem(self._pd_mon_pwr_plot) 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) 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 = LiveAxis('left', text="Temperature", units="")
tec_temp_axis.showLabel() 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.setAxisItems({'left': tec_temp_axis})
tec_temp_graph.addItem(self._tec_setpoint_plot) tec_temp_graph.addItem(self._tec_setpoint_plot)
tec_temp_graph.addItem(self._tec_temp_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.addLegend(brush=(50, 50, 200, 150))
tec_i_graph.addItem(self._tec_i_target_plot) tec_i_graph.addItem(self._tec_i_target_plot)
tec_i_graph.addItem(self._tec_i_measure_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) 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_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) self.tec_i_measure_connector = DataConnector(self._tec_i_measure_plot, plot_rate=10.0, update_rate=10.0, max_points=self.max_samples)