Help with substracting the two average ERP waveforms

By using Brainstorm, I have calculated and plotted two distinct ERP waveforms (first of which is in response to deviant, and the second in response to standard stimuli; both are part of a mismatch negativity paradigm). I eventually want to plot difference waveforms (deviant minus standard ERP). Is there a solution to this problem in Brainstorm software? Thank you.

Hello
In the Process2 tab, you can put one file in the list “Files A”, the other in the list “Files B”, and run the process “Other > Difference A-B”.
If those files are averages of conditions, you could also run a Student’s t-test deviant vs. standard: place all the trials of one condition on one side, and all the trials of the other condition on the other side.
Francois

Hi, Francois,
I have a similar question, but instead of two ERP waveforms, I have two distinct MEG waveforms (one for deviant, and one for standard). But I would also like to calculate and plot the difference wave.
I know where should I get the process for calculating the difference wave, but since MEG data usually using the RMS of the planar gradiometers, which means this is an absolute value. According to your tutorial, we need to be careful when using absolute values. So my question is, when we calculate the difference waveform, should we use the value before we calculate the RMS or the value after it? Take the deviant and standard stimulus as an example, should we calcuate "deviant-standard" first and then calculate the RMS value, or calcuate the difference wave with "(deviant | norm)- (standard | norm)" (norm means the RMS value of the two gradiometers)?
Thanks in advance and have a nice weekend!

Best,
Qianru

but since MEG data usually using the RMS of the planar gradiometers

This is only one possible approach. Two alternatives are: the magnetic reinterpolation as a surface of virtual magnetometers (see links below) and the source estimation (working on the cortex surface only).

So my question is, when we calculate the difference waveform, should we use the value before we calculate the RMS or the value after it?

I would not apply this RMS before any other operation (difference, average...)
Compute the difference, and then explore visually with the norm of the gradiometers if the topographies or time series are more meaningful to you.

Thank you so much for your prompt reply! Have a nice weekend!

Best,
Qianru