MaxwellMovementComp
Namespace: RTPROCESSINGLIB · Library: DSP Library
mne.preprocessing.maxwell_filter (head_pos) in MNE-Python.
#include <dsp/maxwell_movement_comp.h>
class UTILSLIB::MaxwellMovementComp
Maxwell movement compensation using SSS.
Usage:
QList<HeadPosEntry> headPos = ...; // from cHPI fitting
MaxwellMoveCompParams params;
Eigen::MatrixXd compensated = MaxwellMovementComp::apply(
matData, fiffInfo, headPos, params);
Static Methods
apply(matData, fiffInfo, headPos, dSFreq, params)
Apply movement compensation via SSS.
For each time segment (defined by headPos entries), the data is: Projected into SSS multipole space using the actual head position.
Reconstructed at the reference head position.
Parameters:
-
matData : const Eigen::MatrixXd & Full sensor data (n_channels × n_samples).
-
fiffInfo : const FiffInfo & Measurement info (channel positions, etc.).
-
headPos : const QList< HeadPosEntry > & Head positions over time (from cHPI).
-
dSFreq : double Sampling frequency (Hz).
-
params : const MaxwellMoveCompParams & Compensation parameters.
Returns:
- Eigen::MatrixXd — Movement-compensated data (n_channels × n_samples).
readHeadPos(sPath)
Read head positions from a file.
File format: whitespace-separated columns per line: time q1 q2 q3 tx ty tz gof
Parameters:
- sPath : const QString & Path to head position file.
Returns:
- QList< HeadPosEntry > — List of head position entries.
writeHeadPos(sPath, headPos)
Write head positions to a file.
Parameters:
-
sPath : const QString & Output file path.
-
headPos : const QList< HeadPosEntry > & Head positions to write.
Returns:
- bool — true if successful.
Authors of this file
- Christoph Dinh <christoph.dinh@mne-cpp.org>