EEG Stream

Reimplementation of Matplotlib-FigureStream with some renames and a preconfigured server.

class bci_framework.extensions.visualizations.eeg_stream.EEGStream(*args: Any, **kwargs: Any)[source]

Matplotlib figure re-implementation.

This class define some usefull methods to use for simplificate the data manipulation.

create_lines(mode: Literal[eeg, accel, analog, digital] = 'eeg', time: Optional[int] = - 15, window: Optional[int] = 1000, cmap: Optional[str] = 'cool', fill: Optional[numpy.ndarray] = numpy.nan, subplot: Optional[list] = [1, 1, 1])Tuple[matplotlib.axes.Axes, numpy.ndarray, list][source]

Create plot automatically.

Create and configure a subplot to display figures.

Parameters
  • mode – Used for select the axis labels.

  • time – The time window, can be negative.

  • window – The number of samples used to draw the figure.

  • cmap – The matplolib cmap to use.

  • fill – Start signals array with this value.

  • subplot – The matplolib subplot.

Returns

  • axis – The subplot created.

  • time – The time array.

  • lines – The matplotlib lines object created for each channel.

plot_pivot()[source]

Update the position of the boundary line.

reverse_buffer(axis: Optional[matplotlib.axes.Axes] = None, min: Optional[int] = 0, max: Optional[int] = 17, color: Optional[str] = 'k')[source]

Add the boundary line to some visualizations.

class bci_framework.extensions.visualizations.eeg_stream.MNEObjects[source]

Creat MNE handlers using the framework GUI information.

get_mne_evoked()mne.EvokedArray[source]

Create the Evoked object to use with mne handlers.

The information is acquired automatically from GUI interface.

get_mne_info()mne.Info[source]

Create the Info object to use with mne handlers.

The information is acquired automatically from GUI interface.

get_mne_montage()mne.channels.DigMontage[source]

Create the Montage object to use with mne handlers.

The information is acquired automatically from GUI interface.