meeg_utils.io.average_dev_head_t#
- meeg_utils.io.average_dev_head_t(sources)[source]#
Average device-to-head transform of several MEG recordings.
Each recording’s head position (
info["dev_head_t"]) is weighted by its duration outsideBADannotations; rotations are averaged as quaternions (mne.preprocessing.compute_average_dev_head_t()). Use the result as thedestinationofHeadAlignso that every run is mapped to the same position, the one that needs the least movement on average.- Parameters:
sources (sequence of Raw | path | BIDSPath) – The recordings (typically the runs of one session). Paths are read without loading the data.
- Returns:
The average device-to-head transform.
- Return type:
Transform
- Raises:
ValueError – If there are no recordings or one lacks a head transform.