mne_rt.viz.RawPlot#
- class mne_rt.viz.RawPlot(ch_names: list[str], sfreq: float, time_window: float = 10.0, n_shown: int = 20, scale_uv: float = 100.0, info=None, verbose=None)[source]#
Bases:
_MockQMainWindowScrolling raw M/EEG channel viewer.
Displays all channels stacked vertically in a dark-themed
pyqtgraph.PlotWidget, colour-coded by channel index. Channels are scrollable via the mouse wheel on the plot or the scrollbar on the right edge of the signal area. Right-clicking any channel name on the Y-axis immediately opens an MNE sensor-position plot for that channel.- Parameters:
- ch_names
listofstr Channel names. One row is shown per channel.
- sfreq
float Sampling frequency in Hz.
- time_window
float, default 10.0 Visible time range in seconds at startup.
- n_shown
int, default 20 Number of channels visible simultaneously.
- scale_uv
float, default 100.0 Amplitude scale in µV. A signal of this peak amplitude occupies half the per-channel row height. For MEG (Tesla) pass
scale_uv=1e-6(i.e., 1 pT per half-row).- info
mne.Info|None, defaultNone If provided: used to resolve channel types, apply SSP projectors, and show sensor positions on right-click.
- verbosebool |
str|None, defaultNone Verbosity level. See
set_log_level().
- ch_names
See also
mne_rt.viz.NFPlotScrolling NF feature monitor.
mne_rt.RTStream.record_mainDrives the raw display from the NF loop.
Notes
The control panel (right sidebar) provides:
Playback — pause/resume, clear buffer, screenshot.
Amplitude — ÷2 / ×2 scale buttons with a live readout.
Display — time-window selector, grid toggle, DC-removal toggle.
Filter — online causal bandpass/highpass/lowpass/notch (scipy). Applied to new data from the moment “Apply filter” is clicked; data already in the buffer is not retroactively filtered.
Artifact Correction — LMS adaptive filter or ASR, applied from the moment “Apply from now” is clicked. LMS requires a reference channel; ASR calibrates on the current buffer content.
SSP — shown when
infocontains projectors; applied to new data from the moment the checkbox is ticked.
Use the mouse wheel on the signal area or the vertical scrollbar to the right of the traces to page through channels. Right-click any channel label on the Y-axis to open its sensor-position diagram.
Added in version 1.0.0.
- __init__(ch_names: list[str], sfreq: float, time_window: float = 10.0, n_shown: int = 20, scale_uv: float = 100.0, info=None, verbose=None) None[source]#
Methods
__init__(ch_names, sfreq[, time_window, ...])closeEvent(event)push(data)Append a chunk of raw data and refresh the display.
- push(data: ndarray) None[source]#
Append a chunk of raw data and refresh the display.
All active online processing (filter, SSP, artifact correction) is applied to the incoming chunk before it enters the circular buffer. Data already in the buffer is never retroactively modified — the display transitions from unprocessed to processed as new data arrives.
- Parameters:
- data
ndarray,shape(n_channels,n_samples) New raw data chunk.
- data
Notes
The call is a no-op when the plot is paused.
- property bad_segments: list[tuple[float, float]]#
Bad segments as list of (start_s, end_s) in absolute seconds.
- to_annotations()[source]#
Return bad segments as
mne.Annotations.- Returns:
- annotations
mne.AnnotationsorNone Nonewhen no bad segments have been marked.
- annotations