API Reference#

This page provides the complete API reference for MNE-RT.

Core#

mne_rt.RTStream

Real-time Real-time M/EEG session controller.

mne_rt.RTEpochs

Event-triggered epoch accumulator backed by mne_lsl.stream.EpochsStream.

Visualisation#

mne_rt.viz.NFPlot

Scrolling real-time neurofeedback signal monitor.

mne_rt.viz.RawPlot

Scrolling raw M/EEG channel viewer.

mne_rt.viz.EpochPlot

Real-time scrolling M/EEG viewer with epoch / trigger overlays.

mne_rt.viz.BrainPlot

Interactive real-time 3D brain activation display.

mne_rt.viz.TopomapPlot

Real-time scalp topomap showing per-band power distribution.

mne_rt.viz.TopoPlot

Real-time scalp-layout ERP display.

mne_rt.viz.ButterflyPlot

Real-time butterfly plot: all EEG/MEG channels overlaid per condition.

mne_rt.viz.TFRPlot

Real-time time-frequency representation (TFR).

mne_rt.viz.CompareEvoked

Real-time per-channel condition overlay with SEM shading and peak markers.

Artifact correction#

mne_rt.tools.AdaptiveLMSFilter

Adaptive LMS filter for real-time EOG / ECG artifact removal.

mne_rt.tools.ORICA

Online Recursive ICA (ORICA) for EEG data.

mne_rt.tools.GEDAIDenoiser

Artifact removal via Generalised Eigendecomposition-based Artifact Identification (GEDAI).

mne_rt.tools.ASRDenoiser

Artifact Subspace Reconstruction (ASR) for streaming EEG.

mne_rt.tools.RTMaxwellFilter

Real-time Maxwell filtering (SSS / tSSS) for streaming MEG data.

Quality control#

mne_rt.tools.BadChannelDetector

Multi-criterion real-time bad channel detector for streaming M/EEG.

mne_rt.tools.RiemannianPotatoDetector

Online EEG/MEG artifact detector based on the Riemannian Potato.

NF Protocols#

See NF Protocols for the full protocol guide with formulas and examples.

mne_rt.protocols.ThresholdProtocol

Threshold-based NF reward protocol with optional adaptive threshold.

mne_rt.protocols.ZScoreProtocol

Z-score feedback protocol with rolling baseline normalisation.

mne_rt.protocols.PercentileProtocol

Percentile-based NF reward protocol with rolling history.

mne_rt.protocols.LinearTrendProtocol

Reward protocol that detects a statistically significant NF trend.

mne_rt.protocols.ShamProtocol

Wraps any NF protocol with sham (double-blind) feedback.

mne_rt.protocols.UpDownStaircaseProtocol

Up-down adaptive staircase threshold protocol.

mne_rt.protocols.MultiBandProtocol

Reward protocol for simultaneous two-band control.

mne_rt.protocols.RLProtocol

Adaptive NF protocol with reinforcement-learning threshold updates.

mne_rt.protocols.OperantProtocol

Operant conditioning reinforcement-schedule wrapper.

mne_rt.protocols.TransferProtocol

Cross-session transfer NF protocol seeded from a prior-session file.

Feature combiners#

Reduce multiple parallel NF feature values to a single mixed feedback score. See FeatureCombiner for the base-class interface.

mne_rt.combiners.FeatureCombiner

Abstract base class for multi-feature NF combiners.

mne_rt.combiners.WeightedSumCombiner

Weighted linear combination of feature values.

mne_rt.combiners.GeometricMeanCombiner

Geometric mean of (positive) feature values.

mne_rt.combiners.ZScoredNormCombiner

Euclidean norm after online z-score normalisation of each feature.

mne_rt.combiners.LearnedCombiner

Data-driven combination via a fitted sklearn-compatible estimator.

Feedback output#

mne_rt.OSCSender

Thread-safe OSC client that broadcasts NF feature values.

mne_rt.LSLSender

Thread-safe LSL outlet that broadcasts NF feature values.

Tools & utilities#

mne_rt.tools.simulate_raw

Generate a synthetic EEG or MEG recording with a sinusoidal source.

mne_rt.tools.simulate_nf_session

Generate a realistic multi-artifact EEG simulation for NF testing.

mne_rt.modalities.ModalityMixin

Feature-extraction engine for all ANT NF modalities.

BIDS I/O#

mne_rt.tools.save_as_bids

Save a neurofeedback session in BIDS format.

Logging#

mne_rt.set_log_level

Set the ANT (and MNE) logging level.