How to plot sensors location on a template brain ?


I am using:

  • MNE version: 1.1.1
  • operating system: Windows 10

I am trying to plot sensors location from the MNI coordinates system on a template brain. I succeed in using a template brain, but when plotting it, the sensors are outside the brain.

I guess I don’t have the correct transformation from MNI coordinates system to the Head coordinates system, but how to find it ? I didn’t find the answer in the mne doc about coordinates system.

Here is the code with the real sensor values:

import mne
from mne.datasets import sample

data_path = sample.data_path()
subjects_dir = data_path / "subjects"

ch_pos = {
    "HRA1": [0.072, 0.124, 0.047],
    "HRA2": [0.065, 0.122, 0.051],
    "HRA3": [0.057, 0.119, 0.056],

dig_montage = mne.channels.make_dig_montage(ch_pos, coord_frame="head")
info = mne.create_info(ch_names=list(ch_pos), sfreq=1000, ch_types="seeg")

    trans=mne.transforms.Transform(fro="mri", to="head"),

Any help would be greatly appreciated !

1 Like

A few things to look at:

I hope the first link will probably be enough. Let us know if you are still stuck; sorry for the terse answer, fairly busy today.

I just found out that the database I use claims to give coordinates in the MNI space, but it turns out that they don’t… So I missed a transformation before plotting the sensors location. Now everything works fine, thank you, and sorry for that.

1 Like