# Unmatched evoked activity from plot output

**URL:** <https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487>\
**Category:** Support & Discussions\
**Tags:** meg, evoked\
**Created:** [January 14, 2021, 11:34am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487 "2021-01-14T11:34:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AaronAng](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@AaronAng](https://mne.discourse.group/u/AaronAng)\
**Post date:** [January 14, 2021, 11:34am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/1 "2021-01-14T11:34:48Z")

</div>

mne version: 0.21.dev  
OS: Windows 10

 ![1sensor](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/0241e16d4272b2cc48836b1b263d77c124717810.png)  
 ![gradsensor](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/5e9d7bf2acf6a5f890d75b5e37c93145d3e079f8.png)

Hi there,

Both plots above are showing the evoked activity on one sensor (Top) and across all gradiometers (Bottom). While it looks like the one sensor plot is normalised to mean (as zero), the gradiometer plot does it a little differently. I would like to ask if it is possible for one condition to show stronger evoked response over the other across the entire time frame (as shown in the bottom plot)? Or is this the result of an error somewhere either from my data or a plotting issue?

The plots were generated by:

```python

# blanks3_all and blanks5_all are lists of evoked data of all my participants, acquired from mne.read_evokeds. 
grand_blanks3_data = mne.grand_average(blanks3_all, interpolate_bads=True, drop_bads=True)
grand_blanks5_data = mne.grand_average(blanks5_all, interpolate_bads=True, drop_bads=True)

grand_blanks3_data.crop(-0.2, 0.5)
grand_blanks5_data.crop(-0.2, 0.5)
 
grand_blanks3_data.filter(8.,70.)
grand_blanks5_data.filter(8.,70.)

evokeds = {'blank_3': grand_blanks3_data, 'blank_5': grand_blanks5_data}
 
# ch_name is the name of the single sensor for the single plot, and swapped to 'grad' for the gradiometer plot
mne.viz.plot_compare_evokeds(evokeds, colors={'blanks_5': (0,1,0), 'blanks_3': (0,0.5,0)}, picks=ch_name);

```

---

<div class="post-metadata">

**Author:** ![AaronAng](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@AaronAng](https://mne.discourse.group/u/AaronAng)\
**Post date:** [January 18, 2021, 4:15am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/2 "2021-01-18T04:15:17Z")

</div>

Bump. Any kind insights from anyone?

---

<div class="post-metadata">

**Author:** ![mainakjas](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mainakjas/32/34_2.png) [@mainakjas](https://mne.discourse.group/u/mainakjas)\
**Post date:** [January 18, 2021, 6:04am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/3 "2021-01-18T06:04:59Z")

</div>

Hi – my guess is you are missing some kind of baseline correction. Did you take that into account?

Mainak

---

<div class="post-metadata">

**Author:** ![AaronAng](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@AaronAng](https://mne.discourse.group/u/AaronAng)\
**Post date:** [January 18, 2021, 10:35am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/4 "2021-01-18T10:35:13Z")

</div>

Thanks for your input! I added:

> grand\_blanks3\_data.apply\_baseline(baseline=[1.75,2.75])  
> grand\_blanks5\_data.apply\_baseline(baseline=[1.75,2.75])

between cropping and filtering based on the codes above but unfortunately didn’t make any difference.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [January 18, 2021, 11:55am UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/5 "2021-01-18T11:55:35Z")

</div>

> [@AaronAng](#):
>
> mne version: 0.21.dev

Could you try again with MNE 0.22?

---

<div class="post-metadata">

**Author:** ![AaronAng](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@AaronAng](https://mne.discourse.group/u/AaronAng)\
**Post date:** [January 18, 2021, 12:13pm UTC](https://mne.discourse.group/t/unmatched-evoked-activity-from-plot-output/2487/6 "2021-01-18T12:13:39Z")

</div>

Hi Richard, thanks. I’ve just updated it but unfortunately, the problem still exist.

I should add that this outlier condition is an artificially generated condition that I created based on the existing data - by sampling random intervals of an existing condition data file. All I did was create time stamps and append it onto a fresh array that follows the format of a standard events output (ie.

> np.array([event time, stim chn before event, event\_id])

. I did not think that this would affect the evoked output in anyway since the evoked data was not manipulated in this process. Rather, this array guides the extraction process of the evoked activity during these time stamps from the actual raw data.
