v2.0.0
Loading...
Searching...
No Matches
rt_cov.h File Reference

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>
Include dependency graph for rt_cov.h:
This graph shows which files directly or indirectly include this file:

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

Detailed Description

Real-time noise covariance estimation from streaming MEG / EEG data blocks.

SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors

Author
Christoph Dinh chris.nosp@m.toph.nosp@m..dinh.nosp@m.@mne.nosp@m.-cpp..nosp@m.org
Since
2.1.0
Date
March 2026

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 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.