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

Top-level convenience entry points that mirror MNE-Python's apply_inverse_* / compute_source_psd helpers. More...

#include "inv_global.h"
#include "inv_source_estimate.h"
#include <Eigen/Core>
#include <QList>
#include <QString>
#include <QPair>
#include <QMap>
Include dependency graph for inv_convenience.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  MNELIB
 Core MNE data structures (source spaces, source estimates, hemispheres).
namespace  FIFFLIB
 FIFF file I/O, in-memory data structures and high-level readers/writers.
namespace  INVLIB
 Inverse source estimation (MNE, dSPM, sLORETA, dipole fitting).

Functions

INVSHARED_EXPORT QList< InvSourceEstimateINVLIB::applyInverseEpochs (const QList< Eigen::MatrixXd > &epochs, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", float tmin=0.0f, float tstep=0.001f, bool pickNormal=false)
 Apply inverse operator to each epoch in a list.
INVSHARED_EXPORT InvSourceEstimate INVLIB::applyInverseRaw (const FIFFLIB::FiffRawData &raw, const MNELIB::MNEInverseOperator &inverse, float lambda2, const QString &method="dSPM", int from=-1, int to=-1, bool pickNormal=false)
 Apply inverse operator to raw data in blocks.
INVSHARED_EXPORT QPair< Eigen::VectorXd, Eigen::RowVectorXf > INVLIB::estimateSnr (const FIFFLIB::FiffEvoked &evoked, const MNELIB::MNEInverseOperator &inverse, const QString &method="dSPM")
 Estimate SNR from evoked data and inverse operator.
INVSHARED_EXPORT QPair< Eigen::MatrixXd, int > INVLIB::computeWhitener (const FIFFLIB::FiffCov &noiseCov, int rank=0)
 Compute whitening matrix from a noise covariance.
INVSHARED_EXPORT QPair< Eigen::MatrixXd, Eigen::VectorXd > INVLIB::computeSourcePsd (const InvSourceEstimate &stc, float sfreq, float fmin=0.0f, float fmax=-1.0f, int nFft=0)
 Compute PSD for a source estimate using Welch's method.
INVSHARED_EXPORT QMap< QString, Eigen::VectorXd > INVLIB::computeSourceBandPower (const InvSourceEstimate &stc, float sfreq, const QMap< QString, QPair< float, float > > &bands)
 Compute band power for source estimate.

Detailed Description

Top-level convenience entry points that mirror MNE-Python's apply_inverse_* / compute_source_psd helpers.

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.2.1
Date
May 2026

Free functions in this header glue together the lower-level INVLIB classes so users can match the MNE-Python ergonomics: INVLIB::applyInverseEpochs applies a precomputed inverse operator across an epoch list, applyInverseRaw streams raw data through the kernel in blocks, estimateSnr returns the source-space SNR trace from an evoked + inverse pair, computeWhitener produces the diagonal whitener from a noise covariance, and computeSourcePsd / computeSourceBandPower run Welch-based spectral analysis directly on InvSourceEstimate output. All methods are headers-only orchestration on top of InvMinimumNorm and the underlying FIFF / MNE primitives.

Definition in file inv_convenience.h.