# Epochs.apply\_baseline

**URL:** <https://mne.discourse.group/t/epochs-apply-baseline/3404>\
**Category:** Support & Discussions\
**Tags:** preprocessing, meg, visualization\
**Created:** [July 14, 2021, 2:29pm UTC](https://mne.discourse.group/t/epochs-apply-baseline/3404 "2021-07-14T14:29:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mengjin123](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mengjin123/32/217_2.png) [@mengjin123](https://mne.discourse.group/u/mengjin123)\
**Post date:** [July 14, 2021, 2:29pm UTC](https://mne.discourse.group/t/epochs-apply-baseline/3404/1 "2021-07-14T14:29:53Z")

</div>

Hi everyone,  
I am confused and troubled by the function of epochs.apply\_baselines. After I used this function, the plot evoked data of the baseline time interval is still fluctuated large. How can I average and smooth the baseline time interval data.  
Here is my code and the timeline of my experiment: the first stimulus was presented at the timepoint of 0.3, so the baseline is (-0.05, 0.3);

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/ca78f8031d7802b2e1e94bf4dcbee7b7f33af5e7.jpeg)  
 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/6d5ca3fb2c1099841c21e2de82a2008f8f54358f.png)

---

<div class="post-metadata">

**Author:** ![mmagnuski](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mmagnuski/32/153_2.png) [@mmagnuski](https://mne.discourse.group/u/mmagnuski)\
**Post date:** [July 15, 2021, 12:00am UTC](https://mne.discourse.group/t/epochs-apply-baseline/3404/2 "2021-07-15T00:00:58Z")

</div>

> [@mengjin123](#):
>
> the baseline time interval is still fluctuated large. How can I average and smooth the baseline time interval data.

Hi @mengjin123 - `.apply_baseline()` does not smooth the signal - it only removes the average values from the baseline period from each data sample. This is equivalent to moving the signal along the y axis by some value. To remove unwanted frequency content you may want to use filtering. But make sure that you have enough trials per condition to observe nice ERPs

---

<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:** [July 16, 2021, 10:29am UTC](https://mne.discourse.group/t/epochs-apply-baseline/3404/3 "2021-07-16T10:29:18Z")

</div>

Hello,

> [@mengjin123](#):
>
> so the baseline is (-0.05, 0.3)

like @mmagnuski said, applying baseline correction merely, for each channel:

- calculates the average amplitude in the baseline period, and
- subtracts this average from the entire epoch.

If there are large amplitude fluctuations during the baseline period, these will still be visible after baseline correction – only the baseline signal will now be centered around zero.
