Real-time noise covariance estimation from streaming MEG / EEG data blocks. More...
#include "../dsp_global.h"#include <fiff/fiff_cov.h>#include <fiff/fiff_info.h>#include <QSharedPointer>#include <QThread>#include <Eigen/Core>

Go to the source code of this file.
Classes | |
| struct | RTPROCESSINGLIB::RtCovComputeResult |
| Bundled output of a real-time covariance computation step containing the covariance matrix and sample count. More... | |
| class | RTPROCESSINGLIB::RtCov |
| Controller that manages background covariance matrix estimation from streaming data. More... | |
Namespaces | |
| namespace | FIFFLIB |
| FIFF file I/O, in-memory data structures and high-level readers/writers. | |
| namespace | RTPROCESSINGLIB |
Real-time noise covariance estimation from streaming MEG / EEG data blocks.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
RtCov maintains a running unbiased estimate of the channel–channel covariance matrix used by linear inverse operators (MNE, dSPM, sLORETA, beamformers). Every incoming block contributes its centred outer product X⋅Xᵀ to the accumulator together with the per-block sample count; the final covariance is the weighted sum divided by the total number of samples minus one. Computation is offloaded to a worker QThread so the acquisition pipeline never blocks on the dense matrix multiply.
The RTPROCESSINGLIB::RtCovComputeResult bundle carries both the matrix and the sample count, which lets downstream consumers combine partial estimates, apply rank-corrections, or convert to a FIFFLIB::FiffCov for persistence and inverse-operator construction.
Definition in file rt_cov.h.