FFT, multi-taper combination and PSD/CSD assembly kernels. More...
#include "spectral.h"#include "math.h"#include <unsupported/Eigen/FFT>#include <QtMath>#include <QtConcurrent>#include <QVector>
Go to the source code of this file.
FFT, multi-taper combination and PSD/CSD assembly kernels.
SPDX-License-Identifier: BSD-3-Clause Copyright (c) 2026 MNE-CPP Authors
Implements the static estimators declared in spectral.h. Each tapered FFT runs through Eigen::FFT (Kiss-FFT backend) at O(N log N); the K taper streams are then averaged into a PSD with the one-sided scaling convention or combined into a complex cross-spectral-density matrix per frequency bin. The matrix entry point uses QtConcurrent::mapped to spread channels across worker threads while keeping a deterministic ordering in the output vector.
Numerical conventions match MNE-Python's psd_array_multitaper and csd_array_multitaper so coherence, phase-locking and DICS results computed downstream by CONNECTIVITYLIB remain comparable across the two stacks.
Definition in file spectral.cpp.