mne_rt.viz.TopoPlot#

class mne_rt.viz.TopoPlot(ch_names: list[str], sfreq: float, tmin: float, tmax: float, event_id: dict[str, int], info=None, montage: str = 'standard_1020', baseline: tuple | None = (None, 0), window_size: tuple[int, int] = (1440, 900), verbose: bool | str | None = None)[source]#

Bases: _MockQMainWindow

Real-time scalp-layout ERP display.

One mini pyqtgraph.PlotItem per electrode, placed at the channel’s true 2-D scalp position from mne.channels.find_layout(). Condition averages (with optional ±1 SEM shading) are redrawn after every update() call.

Parameters:
ch_nameslist of str

Electrode names in data order.

sfreqfloat

Sampling frequency in Hz.

tminfloat

Epoch start (s).

tmaxfloat

Epoch end (s).

event_iddict[str, int]

Condition label → marker integer.

infomne.Info or None

When provided, mne.channels.find_layout() is called on this object for exact scalp positioning and channel-type detection (EEG → µV, MEG mag → fT, MEG grad → fT/cm). Pass epochs_stream.info from RTEpochs.

montagestr, default “standard_1020”

Fallback montage when info is not given or has no dig points.

baselinetuple or None, default (None, 0)

Baseline interval — drawn as a shaded region.

window_sizetuple of int, default (1440, 900)

Initial window size in pixels.

verbosebool or str or None
.. versionadded:: 1.0.0

See also

mne_rt.RTEpochs

Drives this plot via update().

mne_rt.viz.ButterflyPlot

All-channel overlay alternative.

mne_rt.viz.CompareEvoked

Large per-channel view with SEM ribbons.

__init__(ch_names: list[str], sfreq: float, tmin: float, tmax: float, event_id: dict[str, int], info=None, montage: str = 'standard_1020', baseline: tuple | None = (None, 0), window_size: tuple[int, int] = (1440, 900), verbose: bool | str | None = None) None[source]#

Methods

__init__(ch_names, sfreq, tmin, tmax, event_id)

resizeEvent(event)

showEvent(event)

update(data, conditions)

Redraw all channel plots with updated condition averages.

showEvent(event) None[source]#
resizeEvent(event) None[source]#
update(data: ndarray, conditions: list[str]) None[source]#

Redraw all channel plots with updated condition averages.

Thread-safe — may be called from the acquisition thread.

Parameters:
datandarray, shape (n_epochs, n_channels, n_times)

All accepted epochs so far.

conditionslist of str

Condition label for each epoch; len(conditions) == data.shape[0].