issue with compute morphing for MEG - different vertices, no average stc

  • MNE version: 1.9.0
  • operating system: Windows 11

I have a similar issue to the one posted in Creating a morph object for subjects with different number of vertices

I have MEG data from 14 participants that I want to analyse. I already have the stcs of each subject and I want to create one morph object for all the subjects to move from individual-level to group-level analysis. I have different number of vertices across subjects and I need to use the following code:

morph = mne.compute_source_morph(stc, 
                                     subject_from="S01",
                                     subject_to="fsaverage",
                                     subjects_dir=subject_dir) 

stc_fsaverage = morph.apply(stc)

The problem is that I do not know how to integrate the stc information for every subject to create an average stc. Do I need to compute a morphing source for every subject?

I also suspect that I may have a problem with the fsaverage that has been created, I don’t know whether I am missing some files.

Within the folder “fsaverage” → “morph-maps”, I only have 2 files:

Thank you in advance for your help.

Do I need to compute a morphing source for every subject?

Yes. Do that and all the morph maps will be created. A morph object is about a specific subject to fsaverage. Then, when all the individual stcs have all been morphed to fsaverage, you can average by doing something like (stc_sub1 + stc_sub2) / 2