iblrig.gui.online_plots.BpodWidget

Inheritance diagram of BpodWidget

class iblrig.gui.online_plots.BpodWidget[source]

A widget for visualizing Bpod data in a graphical layout.

This widget displays digital channels and Bpod states over time, allowing for the visualization of trial data.

__init__(*args, title=None, alpha=64, channels=None, showStatusTips=True, **kwargs)[source]

Initialize the BpodWidget.

Parameters:
  • *args (tuple) – Positional arguments to be passed to the parent class.

  • title (str | None, optional) – The title of the widget (default is None).

  • alpha (int, optional) – The alpha value used in color-coding the Bpod states. Default: 64.

  • channels (Iterable, optional) – An iterable of channel names to be included in the plot. Defaults are BNC1, BNC2, and Port1.

  • showStatusTips (bool, optional) – Show status tips when hovering the mouse over state regions. Default: True

  • **kwargs (dict) – Keyword arguments to be passed to the parent class.

Parameters:
addDigitalChannel(channel, label=None)[source]

Add a digital channel to the widget.

Parameters:
  • channel (str) – The name of the digital channel to add.

  • label (str | None, optional) – The label for the channel (default is None, which uses the channel name).

Parameters:
  • channel (str)

  • label (str | None)

setData(data)[source]

Set the data for the widget and update the display.

Parameters:

data (pd.DataFrame) – The data to be displayed in the widget. The data needs to be organized according to the format returned by bpod_trial_data_to_dataframe().

Parameters:

data (DataFrame)

showStateInfo(index)[source]

Show information about the state in the status bar.

Parameters:

index (int) – The index of the state to display.

Parameters:

index (int)

showTrial()[source]

Display the trial data in the widget. This method updates the limits and plots for each digital channel.

updateXRange()[source]
data = Empty DataFrame Columns: [] Index: []
labels: dict[str, LabelItem] = {}
meshes: dict[str, StateMeshItem] = {}
plots: dict[str, PlotDataItem] = {}
viewBoxes: dict[str, ViewBox] = {}