combined eeg meg forward model

Hello,

I have found something odd that I donā€™t really understand.
I need to create a forward solution with 3 layers BEM model for combined EEG and MEG.
I followed the tutorial.

When plotting the leadfield, I noticed that some channels appeared to be ā€œsilentā€.
I then tried to create different forward solutions with EEG only, MEG only, and EEG and MEG combined.
This is how the leadfiled and the covariance of the leadfield appear for the combined forward model (which is different from the EEG only and MEG only forward models)


I suspect that when I create a forward model (but also when I load from memory a ā€œcorrectedā€ forward model), it is not merging correctly EEG and MEG.
Specifically, forward_model[ā€˜infoā€™][ā€˜ch_namesā€™] and forward_model[ā€˜solā€™][ā€˜nrowsā€™] have a different order.

I can fix this by reorganising the leadfields as below

mislab_ch = fwd[ā€˜solā€™][ā€˜row_namesā€™]
correct_ch = fwd[ā€˜infoā€™][ā€˜ch_namesā€™]
fwd[ā€˜solā€™][ā€˜dataā€™] = pd.DataFrame(fwd[ā€˜solā€™][ā€˜dataā€™], index=mislab_ch).loc[correct_ch, :].values

As confirmed by the visual plot here.


I donā€™t get this behaviour when creating the forward model using the sample subject provided by MNE (i.e., same in the tutorial but with a 3 layers BEM and including EEG).

I am still not sure how this affects my inverse operator, but I thought it was worth reporting and asking your opinion about that.

Thanks,

Federica

  • MNE version: e.g. 1.2