First, I read the event track on which there are my files
Then I import the epochs
When I import by script a MEG/EEG .fif file:
First I create a 'link to raw file'
Then I 'read event from channel'
Finally I do: 'Import MEG/EEG event' with the corresponding event track
As you can see on the screenshots, I let the default values.
Problem: I do not get the same results manually or by script for the EEG.
Note that in the following screenshots 2 different time ranges are used whether I used the script or not
With the script (therefore when using 'link to raw file', EEG then MEG):
There are some parameters that are different in the two solutions:
Epoch length: make sure that you change the “epoch time window” in the interface window you get when you select the import menu from the database explorer. In your case you selected [-500,+1000]ms
The difference you get in the traces is due to the “Remove DC offset” option in the same panel. If you selected a time range in this window, you have to add an extra process in your script, “Pre-process > Remove DC offset”, right after the process “Import MEG/EEG”
Please let me know if you’re still having trouble obtaining the same results with both approaches.
Francois
Thank you very much François, the results are similar now!
However, it trigerred a new question : when I comput sources for MEG only, I guess I should only use:
'sensortypes', 'MEG, MEG MAG, MEG GRAD',
And not add EEG.
By the way, are both MEG MAG and MEG GRAD included in MEG?
Finally, when computing EEG sources with sLORETA and wMNE, I only get partial information with wMNE (see figure attached, down). I guess it might come from an approximative mapping between EEG positions and the 3D head.
When I compute sources for MEG only, I guess I should only use: 'sensortypes', 'MEG, MEG MAG, MEG GRAD'
I would not recommend to use the combined reconstruction for MEG and EEG, as the way those two modalities overlap/differ is not enough documented yet.
It is usually safer to do two separate reconstructions: one for the MEG, one for EEG.
By the way, are both MEG MAG and MEG GRAD included in MEG?
Yes, if you specify just "MEG", it would include all your MEG sensors (gradiometers and magnetometers).
Use "MEG MAG" and "MEG GRAD" only to process the two modalities separately.
I guess it might come from an approximative mapping between EEG positions and the 3D head.
You can verify the alignment of the EEG/MEG sensors easily: right-click on the channel file > MRI registration > EEG:Check or MEG:Check.
For the EEG, the electrodes have to be located right on the head surface (use the menu "Edit" to fix the position of the electrodes).
For the MEG, the head have to be well positioned in the helmet (if the position is wrong, you have to fix the position of the fiducial points on the MRI, re-import the recordings and re-calculate the sources)