STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
solenoid_characterization_gui.FullPlotWindow Class Reference
Inheritance diagram for solenoid_characterization_gui.FullPlotWindow:
[legend]
Collaboration diagram for solenoid_characterization_gui.FullPlotWindow:
[legend]

Public Member Functions

 __init__ (self, np.ndarray times, np.ndarray pressures, List[Tuple[float, str]] actuator_events, str sensor_label)
 on_reset_view (self)
 on_toggle_mode (self)
 on_save_csv (self)

Public Attributes

 times = np.asarray(times, dtype=float)
 pressures = np.asarray(pressures, dtype=float)
 actuator_events = list(actuator_events)
 sensor_label = sensor_label
list timing_results = []
 widget = QtWidgets.QWidget()
 btn_reset = QtWidgets.QPushButton("Reset View")
 on_reset_view
 btn_mode = QtWidgets.QPushButton("Drag Mode: Pan")
 on_toggle_mode
 btn_save_csv = QtWidgets.QPushButton("Save CSV")
 on_save_csv
 plot_widget = pg.PlotWidget(title=f"Pressure: {sensor_label}")
 table = QtWidgets.QTableWidget()
 v_line
 h_line
 hover_label = pg.TextItem(text="", anchor=(0, 1), color="y")
 proxy

Protected Member Functions

List[Tuple[float, float]] _pair_events (self)
 _run_analysis (self)
 _draw_event_lines (self)
 _populate_table (self)
 _mouse_moved (self, evt)

Detailed Description

Full plot window with timing analysis for all open/close pairs.
Displays per-pair metrics (including ΔP) and averages in a table.

Definition at line 868 of file solenoid_characterization_gui.py.

Constructor & Destructor Documentation

◆ __init__()

solenoid_characterization_gui.FullPlotWindow.__init__ ( self,
np.ndarray times,
np.ndarray pressures,
List[Tuple[float, str]] actuator_events,
str sensor_label )

Definition at line 874 of file solenoid_characterization_gui.py.

References __init__(), and array.resize().

Referenced by __init__().

Member Function Documentation

◆ _draw_event_lines()

solenoid_characterization_gui.FullPlotWindow._draw_event_lines ( self)
protected

◆ _mouse_moved()

◆ _pair_events()

List[Tuple[float, float]] solenoid_characterization_gui.FullPlotWindow._pair_events ( self)
protected
Pair each OPEN with the immediately following CLOSE.

Definition at line 1013 of file solenoid_characterization_gui.py.

References actuator_events.

Referenced by _run_analysis().

◆ _populate_table()

solenoid_characterization_gui.FullPlotWindow._populate_table ( self)
protected
Populate table with per-pair results and averages.

Definition at line 1099 of file solenoid_characterization_gui.py.

References AdcLayout.table, combined_gui.SensorDebugDialog.table, table, and timing_results.

◆ _run_analysis()

solenoid_characterization_gui.FullPlotWindow._run_analysis ( self)
protected
Run timing analysis on all open/close pairs.

Definition at line 1030 of file solenoid_characterization_gui.py.

References _pair_events(), solenoid_characterization_gui.extract_solenoid_timing_live(), pressures, times, and timing_results.

◆ on_reset_view()

◆ on_save_csv()

solenoid_characterization_gui.FullPlotWindow.on_save_csv ( self)
Save pressure data, actuator events, and timing results to CSV.

Definition at line 1190 of file solenoid_characterization_gui.py.

References actuator_events, pressures, times, and timing_results.

◆ on_toggle_mode()

Member Data Documentation

◆ actuator_events

◆ btn_mode

solenoid_characterization_gui.FullPlotWindow.btn_mode = QtWidgets.QPushButton("Drag Mode: Pan")

Definition at line 902 of file solenoid_characterization_gui.py.

Referenced by on_toggle_mode().

◆ btn_reset

solenoid_characterization_gui.FullPlotWindow.btn_reset = QtWidgets.QPushButton("Reset View")

Definition at line 898 of file solenoid_characterization_gui.py.

◆ btn_save_csv

solenoid_characterization_gui.FullPlotWindow.btn_save_csv = QtWidgets.QPushButton("Save CSV")

Definition at line 907 of file solenoid_characterization_gui.py.

◆ h_line

solenoid_characterization_gui.FullPlotWindow.h_line
Initial value:
= pg.InfiniteLine(
angle=0,
movable=False,
pen=pg.mkPen("y", width=1, style=QtCore.Qt.PenStyle.DotLine),
)

Definition at line 982 of file solenoid_characterization_gui.py.

Referenced by _mouse_moved().

◆ hover_label

solenoid_characterization_gui.FullPlotWindow.hover_label = pg.TextItem(text="", anchor=(0, 1), color="y")

Definition at line 989 of file solenoid_characterization_gui.py.

Referenced by _mouse_moved().

◆ on_reset_view

solenoid_characterization_gui.FullPlotWindow.on_reset_view

Definition at line 899 of file solenoid_characterization_gui.py.

◆ on_save_csv

solenoid_characterization_gui.FullPlotWindow.on_save_csv

Definition at line 908 of file solenoid_characterization_gui.py.

◆ on_toggle_mode

solenoid_characterization_gui.FullPlotWindow.on_toggle_mode

Definition at line 904 of file solenoid_characterization_gui.py.

◆ plot_widget

solenoid_characterization_gui.FullPlotWindow.plot_widget = pg.PlotWidget(title=f"Pressure: {sensor_label}")

◆ pressures

solenoid_characterization_gui.FullPlotWindow.pressures = np.asarray(pressures, dtype=float)

◆ proxy

solenoid_characterization_gui.FullPlotWindow.proxy
Initial value:
= pg.SignalProxy(
self.plot_widget.scene().sigMouseMoved, rateLimit=20, slot=self._mouse_moved
)

Definition at line 992 of file solenoid_characterization_gui.py.

◆ sensor_label

solenoid_characterization_gui.FullPlotWindow.sensor_label = sensor_label

Definition at line 888 of file solenoid_characterization_gui.py.

◆ table

solenoid_characterization_gui.FullPlotWindow.table = QtWidgets.QTableWidget()

Definition at line 931 of file solenoid_characterization_gui.py.

Referenced by _populate_table().

◆ times

solenoid_characterization_gui.FullPlotWindow.times = np.asarray(times, dtype=float)

Definition at line 885 of file solenoid_characterization_gui.py.

Referenced by _run_analysis(), and on_save_csv().

◆ timing_results

solenoid_characterization_gui.FullPlotWindow.timing_results = []

◆ v_line

solenoid_characterization_gui.FullPlotWindow.v_line
Initial value:
= pg.InfiniteLine(
angle=90,
movable=False,
pen=pg.mkPen("y", width=1, style=QtCore.Qt.PenStyle.DotLine),
)

Definition at line 977 of file solenoid_characterization_gui.py.

Referenced by _mouse_moved().

◆ widget

solenoid_characterization_gui.FullPlotWindow.widget = QtWidgets.QWidget()

Definition at line 891 of file solenoid_characterization_gui.py.


The documentation for this class was generated from the following file: