Evoked Response Comparison MNE vs Brainstorm

@mmagnuski @agramfort

Attached below are the evoked responses that I obtained using MNE and Brainstorm for the same activity(the same run). I followed the same process of preprocessing with both the softwares ( Bandpass: 1-100, notch at: 60, 120,180,240), later SSP for eye blinks and heartbeat artifacts. As we can see the evoked response obtained from brainstorm is sharper and the magnitude in fT is also larger. What could have caused the evoked response to be different across both the softwares considering that I followed mostly the same process ( only dc offset missing in MNE, couldn’t find that function). Did I do something wrong when preprocessing with MNE or is there an inherent difference in how these algorithm work?

MNE figure:

Brainstorm figure:

The default filter settings for mne and brainstorm can be different, for example. To see exactly where the differences start to appear I would compare the results after each step you conduct. So first compare how the signal looks after filtering depending on the software used. To simplify you could try looking just at a single sensor and for example create a figure where post-filter signal for this sensor is displayed with color differentiating the software package.

2 Likes

I would also check that you averaged the same number of epochs after potential drops
and that the SSP topography is very similar

Alex

1 Like

@agramfort Hi Alex, when I apply SSP with MNE, I can see that it rejects more number of epochs than what I obtain with brainstorm. Eg: compute_proj_ecg rejects 37epochs with MNE where as the bad epochs are only 12 in brainstorm. Is there a way that I can reduce the number of epochs rejected? or prevent compute_proj_ecg from rejecting epochs automatically,so that I can reject them manually instead?

Hello @Subrat_Bastola

compute_proj_ecg() has some default rejection thresholds set:

reject={'grad': 2e-10, 'mag': 3e-12}

That means that any epochs around the ECG events in which gradiometers or magnetometers exceed these values will be removed before calculating the SSP vector(s).

You could try to use bigger values here to reduce the number of rejected epochs.

I would also suggest you compare the number of detected ECG events between MNE and Brainstorm (although I’m not sure if Brainstorm provides this info?)

Best wishes,
Richard

@richard hi, is there a dc offset filter in MNE? If yes, could you tell me the function to use it?

You can apply a high-pass filter, e.g. with 0.1 Hz lower frequency.

1 Like

Hi @richard, @mmagnuski , thank you for your responses. I have one more question. How can i Merge the Gradiometer and Magnetometer time series figure to one figure?

And also, Is there a way that I can apply filters for visualization purpose, only on raw data to mark bad segments in the data, which I can then later undo/ remove ?? Or once a filter has been applied it’s effect can’t be reversed?

Could you please explain what you mean by that? You should get a single figure with two subplots (one for grad and one for mag) by default.

Yes, Raw.plot() accepts highpass and lowpass parameters exactly for this purpose.

As a side note, please try to create a new posting for new questions – makes things easier to navigate and more discoverable for other users! Thank you!

@richard @mmagnuski I mean, is there a way I can get a single MEG evoked response figure just like the one shown with brainstorm instead of separate Gradiometer and Magnetometer subplots?

No, you cannot simply merge the two as these are two different sensor types that produce signals of different units and in different orders of magnitude. I’m not sure what Brainstorm is displaying. What’s the scale and unit of the Brainstorm figure? It appears these parts of the y axis are cut off from the figure you shared?

Hi Richard, the units are in fT for brainstorm

Then this indicates that in this figure, Brainstorm is only displaying magnetometer data… Gradiometers have the unit fT/cm (or something of that kind … field strength per distance).