Misaligned sensor locations (EEG) when plotting sensors on fsaverage

Hi,

when visualizing my sensors mne.viz.plot_alignment, original and projected sensors seem misaligned (inside the skull/brain and also at wrong locations).
When computing “identity_trans” as in this “bad” example, sensor locations get a bit better - now occipital ones seem off.
I suspect that the sensors are not transformed correctly before aligning them with the fsaverage-template. I really appreciate any hint/comment on how to deal with this issue.


some code and background below. I cannot upload an epochs-file, but I can give you additional information if needed.

For computing the forward operator, I’ve used FreeSurfer’s template fsaverage:

# The files live in:
subject = "fsaverage"
trans = "fsaverage" # MNE has a built-in fsaverage transformation
src = os.path.join(fs_dir, "bem", "fsaverage-ico-5-src.fif")
bem = os.path.join(fs_dir, "bem", "fsaverage-5120-5120-5120-bem-sol.fif")

#plot #1 with trans from "fsaverage" folder
mne.viz.plot_alignment(
    epochs.info,
    src=src,
    eeg=["original", "projected"],
    trans=trans,
    show_axes=True,
    mri_fiducials=True,
    dig="fiducials",
)

#plot #2 with identity_trans
identity_trans = mne.transforms.Transform("head", "mri")
mne.viz.plot_alignment(
    epochs.info,
    src=src,
    eeg=["original", "projected"],
    trans=identity_trans,
    show_axes=True,
    mri_fiducials=True,
    dig="fiducials",
)

EEG data were recorded with BrainVision and using actiCap 32 channels (see montage on image).

  • MNE version: 1.4.2
  • operating system: Windows 11

Hello @brizzen, you’ll need to perform coregistration to achieve proper alignment.

Or – and that’s the easier approach if you don’t have measured digitization points anyway (?) – simply apply the standard_1005 montage, which should directly work with the fsaverage brain and the builtin trans = "fsaverage".

epochs.set_montage("standard_1005")
mne.viz.plot_alignment(..., trans="fsaverage")

Best wishes,
Richard

Hi Richard,

wow, easy as that. I’ve attached a screenshot of the alignment, using the “standard_1005” montage (hoping that it looks alright). Thanks a lot for your help.

1 Like

Looks good to me!! Good luck with the rest of your analysis :slight_smile:

Best wishes,
Richard

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.