# Using a separate condition as baseline (e.g., a rest baseline)

**URL:** <https://mne.discourse.group/t/using-a-separate-condition-as-baseline-e-g-a-rest-baseline/3942>\
**Category:** Support & Discussions\
**Tags:** preprocessing, eeg\
**Created:** [November 11, 2021, 3:48pm UTC](https://mne.discourse.group/t/using-a-separate-condition-as-baseline-e-g-a-rest-baseline/3942 "2021-11-11T15:48:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsaeed](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@rsaeed](https://mne.discourse.group/u/rsaeed)\
**Post date:** [November 11, 2021, 3:48pm UTC](https://mne.discourse.group/t/using-a-separate-condition-as-baseline-e-g-a-rest-baseline/3942/1 "2021-11-11T15:48:36Z")

</div>

- MNE-Python version: 0.24.0
- operating system: Windows

Hello, I would like to use a separate condition as a baseline (e.g., a resting state) not using a pre-stimulus baseline. Would it be possible? If so, how?

Thank you in advance,  
Reza

---

<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:** [November 13, 2021, 7:12pm UTC](https://mne.discourse.group/t/using-a-separate-condition-as-baseline-e-g-a-rest-baseline/3942/2 "2021-11-13T19:12:12Z")

</div>

Hello @rsaeed and welcome to the forum!

The `baseline` parameter on `Epochs` instantiation and the `Epochs.apply_baseline()` methods don’t allow for this. However, you can apply a function to each channel in each epoch individually by using [`Epochs.apply_function()`](https://mne.tools/stable/generated/mne.Epochs.html#mne.Epochs.apply_function). You should be able to use this to apply custom transformations to your epochs.

Feel free to ask again if you get stuck.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![sarapiers](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sarapiers/32/3444_2.png) [@sarapiers](https://mne.discourse.group/u/sarapiers)\
**Post date:** [February 15, 2024, 11:15am UTC](https://mne.discourse.group/t/using-a-separate-condition-as-baseline-e-g-a-rest-baseline/3942/3 "2024-02-15T11:15:05Z")

</div>

Did you create a function for doing this? I’d like to do something similar and I was wondering if you could share the way you implemented the function,

Thanks,

Sara
