"equalized" source spaces

Dear all,

I'm trying to obtain for two subjects, source spaces in such a way that
vertices with the same index are located at roughly the same position on
the cortex of both subjects.

My first attempt was to use fsaverage as an intermediary for this:

morph fsaverage --> sub001 --> source space for sub001
morph fsaverage --> sub002 --> source space for sub002

In code:

fsaverage = mne.setup_source_space('fsaverage',
spacing='oct6',subjects_dir=subjects_dir,add_dist=False)
sub001_src = mne.morph_source_spaces(fsaverage, 'sub001',
subjects_dir=subjects_dir)
sub002_src = mne.morph_source_spaces(fsaverage, 'sub002',
subjects_dir=subjects_dir)

However, this does not produce the desired source spaces. While the
number and positions of the vertices now match, the ordering of the
vertices in sub001_src and sub002_src is different.

I can provide a testing script for this on the ds117 "faces" dataset if
necessary.

regards,
Marijn.

The source spaces always store vertices in ascending order (this is due at
the very least to how they are saved, maybe other reasons...?), but the
correct pairing between subjects will in general not follow an ascending
order. Thus the selection of vertices is preserved by the source-space
morphing function, not necessarily the ordering. If you get your source
estimates and use `to_original_src` as in the source space morphing example
<https://github.com/mne-tools/mne-python/blob/master/examples/forward/plot_source_space_morphing.py#L50>
to go back to `fsaverage`, then everything should align properly.

Eric