mad_gui.plot_tools.plots.SensorPlot#

class mad_gui.plot_tools.plots.SensorPlot(plot_data: PlotData, initial_plot_channels=typing.Union[typing.List[str], NoneType], start_time=typing.Union[datetime.datetime, NoneType], label_classes=typing.List[mad_gui.plot_tools.labels.base_label.BaseRegionLabel], event_classes: List[BaseEventLabel] | None = None, parent: QWidget | None = None)[source]#

Bases: BasePlot

Can be used to visualize IMU data and to create, delete and interact with plotted labels.

Parameters:
parent

Parent widget or frame

Methods

keyPressEvent(self, event)

mouseMoveEvent(self, event)

mousePressEvent(self, event)

snap_to_max(pos)

Snap to a maximum in the Config.settings.SNAP_CHANNEL of the sensor.

snap_to_min(pos)

Snap to a minimum in the Config.settings.SNAP_CHANNEL of the sensor.

adapt_to_opening_video_window

clear_labels

delete_item

is_data_plotted

set_tooltip

MODE_HANDLERS = {'add': <class 'mad_gui.plot_tools.plots.sensor_plot_mode_handler.AddModeHandler'>, 'edit': <class 'mad_gui.plot_tools.plots.sensor_plot_mode_handler.EditModeHandler'>, 'investigate': <class 'mad_gui.plot_tools.plots.sensor_plot_mode_handler.InvestigateModeHandler'>, 'remove': <class 'mad_gui.plot_tools.plots.sensor_plot_mode_handler.RemoveModeHandler'>, 'sync': <class 'mad_gui.plot_tools.plots.sensor_plot_mode_handler.SyncModeHandler'>}#
adapt_to_opening_video_window()[source]#
clear_labels(label_class)[source]#
delete_item(item: QObject)[source]#
is_data_plotted()[source]#
keyPressEvent(self, event: QKeyEvent)[source]#
mouseMoveEvent(self, event: QMouseEvent)[source]#
mousePressEvent(self, event: QMouseEvent)[source]#
set_tooltip(mode: Literal['investigate', 'sync', 'add', 'modify', 'remove'])[source]#
snap_to_max(pos: float)[source]#

Snap to a maximum in the Config.settings.SNAP_CHANNEL of the sensor.

Parameters:
pos

Position on the x-channel given in seconds

Returns:
pos_snapped

maximum within pos +- SNAP_RANGE_S (in seconds)/2 defined in your settings.

snap_to_min(pos: float)[source]#

Snap to a minimum in the Config.settings.SNAP_CHANNEL of the sensor.

Parameters:
pos

Position on the x-channel given in seconds

Returns:
pos_snapped

minimum within pos +- SNAP_RANGE_S (in seconds)/2 defined in your settings.