brace.UI package¶
Subpackages¶
- brace.UI.GUIController package
- brace.UI.PlotConfiguration package
- Submodules
- brace.UI.PlotConfiguration.ConfigurePlotHelpers module
HideableElementsGraphicsLayoutWidgetHideableElementsGraphicsLayoutWidget.keyPressEvent()HideableElementsGraphicsLayoutWidget.setLeftLineEntries()HideableElementsGraphicsLayoutWidget.setLegendEntries()HideableElementsGraphicsLayoutWidget.setRightLineEntries()HideableElementsGraphicsLayoutWidget.setSimLeftLineEntries()HideableElementsGraphicsLayoutWidget.setSimRightLineEntries()HideableElementsGraphicsLayoutWidget.staticMetaObjectHideableElementsGraphicsLayoutWidget.toggleAllFromLegend()HideableElementsGraphicsLayoutWidget.toggleLeftLegs()HideableElementsGraphicsLayoutWidget.toggleLeg()HideableElementsGraphicsLayoutWidget.toggleRightLegs()HideableElementsGraphicsLayoutWidget.toggleSimLeftLegs()HideableElementsGraphicsLayoutWidget.toggleSimRightLegs()
MplBasePlotMplBasePlot.addFsrPlot()MplBasePlot.addKneeAnglePlot()MplBasePlot.addOnPickEvent()MplBasePlot.addPickableLegend()MplBasePlot.addThresholdLines()MplBasePlot.addTorquePlot()MplBasePlot.addWindowedAngularVelocityPlot()MplBasePlot.getAxes()MplBasePlot.getAxesMaps()MplBasePlot.getFigure()MplBasePlot.getFigureAxesAxesMapTriple()MplBasePlot.on_pick()MplBasePlot.on_press()MplBasePlot.removeTickNumbers()MplBasePlot.setHideableLegends()MplBasePlot.setHideableLines()MplBasePlot.updateFinalPlotMatplotlib()
PyQTBasePlotaddFsrPlot()addKneeAnglePlot()addLegLegend()addSimKneeAngleLines()addSimStateLines()addSimTorqueLines()addThresholdLegend()addThresholdLines()addTorquePlot()addWindowedAngularVelocityPlot()getLeftLabelFontFormat()setGraphLayout()setPlotLayout()updateLegend()
- Module contents
- brace.UI.PlotView package
Submodules¶
brace.UI.ConfigurationGrid module¶
- class brace.UI.ConfigurationGrid.ConfigurationGrid(parent=None)[source]¶
Bases:
QWidget,Ui_ConfigurationGridThis widget is the Configuration box that contains all of the fields that may be used in changing parameters in the remote. It is also used in the simulator, with one constant set on the top and another mutable set on the bottom.
- staticMetaObject = PySide6.QtCore.QMetaObject("ConfigurationGrid" inherits "QWidget": )¶
brace.UI.ExperimentGroup module¶
- class brace.UI.ExperimentGroup.ExperimentGroup(parent=None)[source]¶
Bases:
QWidget,Ui_UBQVisitTrialsThis widget is found on the right of the calibrate button. Sets subject, visit, and trial numbers that are used in the filenames of saved files.
- staticMetaObject = PySide6.QtCore.QMetaObject("ExperimentGroup" inherits "QWidget": )¶
brace.UI.GraphContext module¶
- class brace.UI.GraphContext.GraphContext(fig: HideableElementsGraphicsLayoutWidget, axes: np.ndarray[PlotItem], axisLines: dict[type, dict[str, PlotDataItem]], simulatorAxisLines: dict[type, dict[str, PlotDataItem]], toggleHBoxLayout: QHBoxLayout, dataType: type, controlLogicType: IntEnum, getConfigurationChangesFunc: Callable[[dict[str, QWidget], ConfigurationGrid], tuple[dict[str, Any], dict[str, Any]]], validateConfigurationFunc: Callable[[ConfigurationGrid, bool, bool, dict[str, float]], bool], writeConfigurationChangesFunc: Callable[[dict[str, Any], dict[str, Any]], None], resetGraphXLimitsFunc: Callable[[np.ndarray[PlotItem], int], None], readConfigurationFromControllerFunc: Callable[[dict[str, Any], bool], None], readConfigurationFromSaveFileFunc: Callable[[dict[str, QWidget], dict[str, Any], bool], None], adjustPlotThresholdValuesFunc: Callable[[MainWindow | Simulator, dict[str, Any], dict[str, Any]], None])[source]¶
Bases:
objectA GraphContext wraps up a set of related widgets, datatypes, and callable functions that should be used together especially with the context of the GUI.
- Parameters:
fig (HideableElementsGraphicsLayoutWidget) – The HideableElementsGraphicsLayoutWidget or GraphicsLayoutWidget that contains the plots.
axes (numpy.ndarray[PlotItem]) – The array of PlotItems that the fig contains.
axisLines (dict[type, dict[str, Line2D]]) – The dictionary that organizes the graph lines hierarchically by type then by attribute.
simulatorAxisLines (dict[type, dict[str, PlotDataItem]]) – The dictionary that organizes simulator graph lines hierarchically by type then by attribute.
toggleHBoxLayout – The small horizontal box layout that contains programmatically defined checkboxes for hiding/showing
checkboxes for the plots. :type toggleHBoxLayout: QHBoxLayout :param dataType: The data type that overall belongs to this particular set of plots. :type dataType: type :param controlLogicType: The enum of the respective control logic with this particular dataset. :type controlLogicType: IntEnum :param getConfigurationChangesFunc: A Callable function that gets the current configuration from the GUI :type getConfigurationChangesFunc: Callable[[dict[str, QWidget], ConfigurationGrid], tuple[dict[str, Any], dict[str, Any]]] :param validateConfigurationFunc: A Callable function that validates the configuration input in the GUI. :type validateConfigurationFunc: Callable[[ConfigurationGrid, bool, bool, dict[str, float]], bool] :param writeConfigurationChangesFunc: A Callable function that writes the configuration to the remote and may update threshold lines. :type writeConfigurationChangesFunc: Callable[[dict[str, Any], dict[str, Any]], None] :param resetGraphXLimitsFunc: A Callable function that resets the graphs back to some initial state before streaming starts again. :type resetGraphXLimitsFunc: Callable[[np.ndarray[PlotItem], int], None] :param readConfigurationFromControllerFunc: A Callable function that reads the configuration from the remote to the GUI. :type readConfigurationFromControllerFunc: Callable[[dict[str, Any], bool], None] :param readConfigurationFromSaveFileFunc: A Callable function that reads the configuration from JSON configuration file to the GUI. :type readConfigurationFromSaveFileFunc: Callable[[dict[str, QWidget], dict[str, Any], bool], None] :param adjustPlotThresholdValuesFunc: A Callable function that adjusts any threshold lines in the plots particularly when parameters are updated. :type adjustPlotThresholdValuesFunc: Callable[[MainWindow | Simulator, dict[str, Any], dict[str, Any]], None]
brace.UI.LoggingHelpers module¶
brace.UI.PlotsPage module¶
brace.UI.SaveDialog module¶
- class brace.UI.SaveDialog.SaveDialog(parent: MainWindow, animatedGraphManager: AnimatedGraphManager, startStreamUnixTime: float, controlLogicEnumType: type)[source]¶
Bases:
Ui_SaveDialog,QDialogThis dialog box is shown when the user stops streaming. It will ask the user whether or not the streamed data should be saved before enacting on the user decision.
- static exporterFactory(suffix: str) AbstractDataExporter[source]¶
Gets the exporter based on the suffix of the file.
- Parameters:
suffix (str) – The file extension to be used for the file.
- Returns:
The exporter that should be used for the graphed data.
- Return type:
- static saveStreamedData(parent: MainWindow, animatedGraphManager: AnimatedGraphManager, startStreamUnixTime: float, controlLogicEnumType: type) None[source]¶
Saves the stream data, getting the experiment numbers and formatting the time in the filename. Trial numbers are incremented after a successful save for convenience.
- Parameters:
parent (MainWindow) – The parent saving GUI that runs this dialog.
animatedGraphManager (AnimatedGraphManager) – The manager that holds all of the graphed data to be exported.
startStreamUnixTime (float) – The estimated time when the stream was started using seconds from the Unix epoch.
controlLogicEnumType (type) – The Enum type that facilitates the state of which control logic was used. Used in converting values.
- staticMetaObject = PySide6.QtCore.QMetaObject("SaveDialog" inherits "QDialog": Methods: #41 type=Slot, signature=saveStreamedData() )¶
brace.UI.SimulatorConfigurationButtons module¶
- class brace.UI.SimulatorConfigurationButtons.SimulatorConfigurationButtons(parent=None)[source]¶
Bases:
QWidget,Ui_ConfigurationButtonsThese are the configuration buttons used in the simulator underneath the configuration box.
- staticMetaObject = PySide6.QtCore.QMetaObject("SimulatorConfigurationButtons" inherits "QWidget": )¶
brace.UI.WindowConfigurationButtons module¶
- class brace.UI.WindowConfigurationButtons.WindowConfigurationButtons(parent=None)[source]¶
Bases:
QWidget,Ui_ConfigurationButtonsThese are the configuration buttons that are in the main GUI that are found below the configuration box.
- staticMetaObject = PySide6.QtCore.QMetaObject("WindowConfigurationButtons" inherits "QWidget": )¶