# Epochs on data with no events

**URL:** <https://mne.discourse.group/t/epochs-on-data-with-no-events/1099>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [October 18, 2016, 12:11pm UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099 "2016-10-18T12:11:56Z")\
**Posts on this page:** 5\
**Page:** 1

<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:** [October 18, 2016, 12:11pm UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099/1 "2016-10-18T12:11:56Z")

</div>

Hi,

I'm trying to analyse data with no events (eyes closed, EEG) and I'm  
trying to segment the data series into 10sec segments (named epochs in  
my references). I tried the Epochs method but it requires events and I  
can't find any other methods doing this.

Is there any way to do this in mne? And if not, is there a way to  
convert the data to the epoch-object from SciPy or will I have to do it  
all in SciPy?

Thanks,  
Lasse

---

<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:** [October 19, 2016, 11:20am UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099/2 "2016-10-19T11:20:10Z")

</div>

Hi Lasse,

you might be looking for this function:  
[http://martinos.org/mne/stable/generated/mne.make\_fixed\_length\_events.html#mne.make\_fixed\_length\_events](http://martinos.org/mne/stable/generated/mne.make_fixed_length_events.html#mne.make_fixed_length_events)

Best,  
Denis

---

<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:** [October 19, 2016, 12:12pm UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099/3 "2016-10-19T12:12:01Z")

</div>

You could also use \_segment\_raw which works like this:

from mne.epochs import \_segment\_raw  
epochs = \_segment\_raw(raw, 10.)

?

2016-10-18 14:11 GMT+02:00 Lasse Balmer Hansen \<s147490 at student.dtu.dk\>:

---

<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:** [October 19, 2016, 1:05pm UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099/4 "2016-10-19T13:05:25Z")

</div>

However, keep in mind that private functions (those that start with `_`)  
are not recommended for public use, as they can change behavior or be  
removed at any time without the changes being documented or going through a  
deprecation cycle. So it is safer to use the public function  
`make_fixed_length_events` to make events, and pass those the events to the  
`Epochs` constructor.

Eric

---

<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:** [October 19, 2016, 1:15pm UTC](https://mne.discourse.group/t/epochs-on-data-with-no-events/1099/5 "2016-10-19T13:15:03Z")

</div>

Right, but if you are using make\_fixed\_length\_events + Epochs, remember to  
set baseline=None, otherwise every first sample of your epochs will be zero.

19 pa? 2016 3:06 PM "Eric Larson" \<larson.eric.d at [gmail.com](http://gmail.com)\> napisa?(a):
