Hi, MNE experts
Recently I would like to concatenate 12 different MEG runs. It reports an error that I could not concatenate different runs because of different head positions. I could use mne.transforms.Transform to change the head position (epoch.info[âdev_head_tâ] = Transform(âmegâ, âheadâ, np.identity(4))) but the following source localization would not work because of the wrong head position. I notice that the âMovement compensationâ function could annotate movement artifacts (Signal-space separation (SSS) and Maxwell filtering â MNE 1.0.2 documentation), but CTF MEG data do not have an additional â.posâ file,
So I would like to ask how to realign the CTF MEG runs to a common head position?
EnvironmentïŒ
- MNE version: e.g. 0.24.0
- operating system: Ubuntu 18.04
- data: CTF MEG data.
Relavant code:
for file in os.listdir(savePath):
if 'filterEpochICAMR_' in file:
fifpath = pj(savePath, file)
epoch = mne.read_epochs(fifpath, preload=False, verbose=True)
epochs_list.append(epoch)
del epoch
epochs_all = mne.concatenate_epochs(epochs_list)
ERROR:
Exception has occurred: ValueError
epochs[1].info['dev_head_t'] differs. The instances probably come from different runs, and are therefore associated with different head positions. Manually change info['dev_head_t'] to avoid this message but beware that this means the MEG sensors will not be properly spatially aligned. See mne.preprocessing.maxwell_filter to realign the runs to a common head position.
File "evoked.py", line xx, in <module>
epochs_all = mne.concatenate_epochs(epochs_list)
Best!
Jinhua