vertex numbers in source space files

dear mne users,

i am using the MNE toolbox to obtain source spaces. in particular, i have a question regarding the vertex numbers in matlab.
i am reading the source space

sspace = mne_read_source_spaces(['fsurf/' subj{s} '/bem/' subj{s} '-ico-5-src.fif']);
sspace(1)
ans =
              id: 101
              np: 136746
            ntri: 273488
     coord_frame: 5
              rr: [136746x3 double]
              nn: [136746x3 double]
            tris: [273488x3 int32]
            nuse: 10242
           inuse: [1x136746 int32]
          vertno: [1x10242 int32]
        nuse_tri: 20480
        use_tris: [20480x3 int32]
         nearest: []
    nearest_dist: []
           pinfo: []
            dist: []
      dist_limit: []

and I calculated an inverse solution for the reduced number of vertices (n = 10242). before morphing this solution to the full 136746 vertices I do the following

Vector = zeros(size(sspace(1).rr,1),1);
Vector(sspace(1).vertno+1) = J;

however, i am unsure whether it is "sspace(1).vertno" or "sspace(1).vertno+1". I had the feeling that the vertex numbers start at 0 and thus adding a 1 is correct. the vector sspace(1).inuse however points towards not adding the 1, since

isequal(find(sspace(1).inuse),sspace(1).vertno)
ans =
     1

could one of you help me regarding which one is right? i was favoring adding 1, because the morphed solution (136746 vertices) and the solution plotted for the reduced number of vertices (10242) looked more alike when i add 1 to sspace(1).vertno

thanks in advance,
bj?rn

hi Bj?rn,

if you get:

isequal(find(sspace(1).inuse),sspace(1).vertno)
ans = 1

it's that vertno is indexed starting at 1 as find returns matlab indices.

HTH
Alex

hey alex,
thank you for your quick response. i also did more digging and compare coordinates in label files (vertex numbers starting from 0) with the coordinates in the source space file after reading in matlab, and you are right +1 is already applied when reading in matlab.
i think I also found what makes my solutions look weird. before, i was first morphing (morph map multiplication) the solution of the reduced source space to the full fsaverage surface and did the smoothing/interpolating on this surface. now i changed the order of this approach, first smoothing/interpolating the solution of the reduced source space to the individual full surface and then I do the morphing. looks very good now.
best,
bj?rn