Ignoring bad segments for computing average trials

Hi everyone,

In my experiment I want to evaluate the brain response using to a painful stimulus using MEG. During each session a subject received 22 painful stimuli. I epoched the data, so now I have 22 trials of each session of each subject. I want to average the 22 trials of each session, so that I have an average response for each subject.

Some of the trials contain a bad segment, when epoching these trials were automatically marked as bad trials. However, sometimes for example only a short period of the pre-stimulus baseline contained a bad segment. Since I only have 22 trials, I want to keep as many trials as possible. Therefore, I would like to keep the trials with a short bad segment as good trials.

When averaging the trials, ideally the bad segment of a trial would be ignored.
My questions are:

  • Are the bad segments (of good trials) ignored when averaging the trials?
  • And when the bad segments aren't ignored for averaging, is there a way to fix this?

Thanks in advance!

Kind regards, Laurien

Are the bad segments (of good trials) ignored when averaging the trials?

No. When averaging trials to compute your average response, all the time samples of the good trials are used. You can't exclude half of a trial, you have to exclude the entire trial.
The main reason is the necessity within you ERF to have all the time samples computed from the same number of values, and therefore the same SNR. Otherwise, having a SNR changing between two time samples would create representations difficult to interpret.

If too many trials are rejected, you can mark manually as good the ones that you think will not alter the features of interest of your average (e.g. if only the beginning of the pre-stim baseline is contaminated with some artifact).