# Extract data from raw without epochs creation

**URL:** <https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051>\
**Category:** Support & Discussions\
**Tags:** preprocessing\
**Created:** [July 10, 2024, 8:47am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051 "2024-07-10T08:47:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mentha](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@mentha](https://mne.discourse.group/u/mentha)\
**Post date:** [July 10, 2024, 8:47am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051/1 "2024-07-10T08:47:10Z")

</div>

Hi!  
I have an eye-open/eye-closed condition in one raw file. I want to split the raw using marks on the stim channel, but without creating epochs. I would appreciate your help 🙂

- MNE version: e.g. 1.4.2
- operating system: Ubuntu 18.04

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [July 10, 2024, 9:30am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051/2 "2024-07-10T09:30:45Z")

</div>

Assumning that there are not multiple eyes open/eyes closed segments, you could use [`raw.crop()`](https://mne.tools/stable/generated/mne.io.Raw.html#mne.io.Raw.crop) to create subsets of the original data. You might want to operate on a copy though, e.g. `raw.copy().crop(...)`.

---

<div class="post-metadata">

**Author:** ![mentha](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@mentha](https://mne.discourse.group/u/mentha)\
**Post date:** [July 10, 2024, 10:05am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051/4 "2024-07-10T10:05:09Z")

</div>

Thanks! But I have different durations for open and closed eyes for different subjects. I want to get the trigger time points, but I don’t quite understand how to do it

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [July 10, 2024, 10:52am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051/5 "2024-07-10T10:52:30Z")

</div>

You can find events in your trigger channel using `mne.find_events(raw)`.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [September 12, 2024, 8:55am UTC](https://mne.discourse.group/t/extract-data-from-raw-without-epochs-creation/9051/6 "2024-09-12T08:55:43Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
