# How to do different windowizing (epoching) in different subregions of a Raw data.

**URL:** <https://mne.discourse.group/t/how-to-do-different-windowizing-epoching-in-different-subregions-of-a-raw-data/3814>\
**Category:** Support & Discussions\
**Tags:** eeg, epochs, annotations\
**Created:** [October 14, 2021, 11:15pm UTC](https://mne.discourse.group/t/how-to-do-different-windowizing-epoching-in-different-subregions-of-a-raw-data/3814 "2021-10-14T23:15:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FeryET](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/feryet/32/825_2.png) [@FeryET](https://mne.discourse.group/u/FeryET)\
**Post date:** [October 14, 2021, 11:15pm UTC](https://mne.discourse.group/t/how-to-do-different-windowizing-epoching-in-different-subregions-of-a-raw-data/3814/1 "2021-10-14T23:15:41Z")

</div>

Hello.

I want to split my raw data into multiple regions, and then epoch each region differently. So far for creating different regions, I’ve used `annotations`, and I’ve annotated each region in the raw file.

I need to do overlapped epoching in some regions, and some normal epoching in other regions. The problem I currently have is that I do not know how can I seperate these annotations from each other, epoching region of each in isolation from others.

- MNE-Python version: 0.23.4
- operating system: Linux

---

<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:** [October 15, 2021, 9:58am UTC](https://mne.discourse.group/t/how-to-do-different-windowizing-epoching-in-different-subregions-of-a-raw-data/3814/2 "2021-10-15T09:58:22Z")

</div>

Hello @FeryET,

I guess what you could do is use the temporal information from the annotations to crop a copy of the data, and then make epochs based on this. For example,

```python
raw_for_epoching = raw.copy().crop(
    tmin=raw.annotations.onsets[...],
    tmax=raw.annotations.durations[...]
)
epochs = mne.Epochs(raw=raw_for_epoching, ...)

```

Good luck,  
Richard
