Vertex confusion occurs when creating stc files.

MNE version: 1.11.0

operating system: Windows 11

Dear experts,

I wanted to create an STC (Source Time Courses) file using the mne.SourceEstimate command, with the source space being set to fsaverage-ico5 (20484 vertices). However, I found that the vertices in the created STC file were completely disordered. So, I conducted the following test: I first created a 20484*1 all-zero vector named data, then assigned the first 1000 elements a value of 1. Then, I drew a point cloud based on the 20484 three-dimensional coordinates of the fsaverage-ico5 vertices and assigned corresponding values (0 or 1) to these points. I found that the first 1000 vertices were concentrated in the left occipital lobe. But when I used mne.SourceEstimate to assign the values of data to the STC file and used stc.plot command to display it, I found that the first 1000 vertices were scattered throughout the left hemisphere. This is clearly incorrect. Could anyone tell me where this problem occurred? Or is the mne.SourceEstimate command not capable of assigning the values of data to the STC file? Below is my code and the resulting images.

point cloud of the 10242 fsaverage-ico5 vertices (left hemisphere), and the first 1000 vertices were concentrated in the left occipital lobe (Red Arrows).

code for creating and plot STC file in jupyter notebook:

import numpy as np
import mne
import os
import scipy.io
from mne.datasets import sample

data_path = sample.data_path()
subjects_dir = data_path / “subjects”
subject = ‘fsaverage’
src = mne.read_source_spaces([subjects_dir “\bem\sample-fsaverage-ico-5-src.fif”])
vertices = [src[0][‘vertno’],src[1][‘vertno’]]

data=np.zeros(20484)
data[0:1000]=1

stc = mne.SourceEstimate(
data=data,
vertices=vertices,
tmin=0,
tstep=1.0,
subject=subject
)

brain = stc.plot(
subjects_dir=subjects_dir,
subject=None,
surface=‘white’,
hemi=‘lh’,
colormap=‘RdBu_r’,
clim=dict(kind=‘percent’, pos_lims=[0, 50, 100]),
time_viewer=True,
size=(1400, 1000),
background=‘white’,
cortex=‘classic’,
alpha=1
)

and I got the following picture:

the red dots are the first 1000 vertices, which spread the whole left hemisphere.

Is anything wrong?

Advance thanks and best wishes.