MNE version: e.g. 1.9.0, python: 3.12.6, OS: Windows 11
Hi,
we have been using MNE-python for source reconstruction of combined MEG+EEG data. Testing the quality with simulations, we noted that some results seemed rather odd, some single simulated sources move to other locations in the brain after fwd-inv-modeling, and correlations between time series before and after fwd-inv-modeling overall tended to be low.
Inspecting the forward operators, we then noticed that there may be a mismatch in the location of EEG channels by the MNE-python code.
Case 1: EEG channels are put after MEG channels in MNE-python:
This is what plotting the fwd[‘sol’][‘data’] implies and also reflected in fwd[‘sol’][‘row_names’], although in fwd[‘info’][‘ch_names’], EEG channels are first, as in the raw data.
This, we think, can be explained by the sensor type order being de-facto hard-coded through the variable:
_FWD_ORDER = dict(meg=“MEG”, eeg=“EEG”)
in mne-python code mne\forward\forward.py, as channels are then read out in exact this order.
We are not fully sure yet if and how this affects the inverse operators; as far as I can see, the code for making inverse operators reads only fwd[‘info’][‘ch_names’], not fwd[‘sol’][‘row_names’], but we haven’t figured out if this ch order actually influences computations.
Case 2: We got some fwd op files where the EEG channels end up in positions 242-305 in the fwd op, which is also reflected in fwd[‘sol’][‘row_names’]. We don’t have any explanation for this yet.
For comparison, we also created fwd and inverse operators for one subject with MNE-C: Here, the EEG channels are also put at the end, but this is also reflected in fwd[‘info’][‘ch_names’], and when we use these operators for source reconstruction (in MNE-python, the simulation results for this subject improve dramatically.
Has this been observed before? Is there a simple way to make sure that the channel order is handled correctly/consistently throughout all steps in MNE-python?

