# Setting event id from annotation

**URL:** <https://mne.discourse.group/t/setting-event-id-from-annotation/9013>\
**Category:** Support & Discussions\
**Tags:** annotations\
**Created:** [June 28, 2024, 10:25am UTC](https://mne.discourse.group/t/setting-event-id-from-annotation/9013 "2024-06-28T10:25:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DUPRAT\_Fabrice](https://avatars.discourse-cdn.com/v4/letter/d/d2c977/32.png) [@DUPRAT\_Fabrice](https://mne.discourse.group/u/DUPRAT_Fabrice)\
**Post date:** [June 28, 2024, 10:25am UTC](https://mne.discourse.group/t/setting-event-id-from-annotation/9013/1 "2024-06-28T10:25:49Z")

</div>

Hi,

To prepare epoching continuous data (EEG), I want to create equally spaced event with an id (ex: 0) on most of the raw signal but I would like another event id (ex: 1) during the annotated signal portions. I thought about 2 ways to do it but always block on something:

1. Add event 0 on the full signal with make\_fixed\_length\_events, but how can I change the event id occuring during annotations ?
2. Add type 1 events on annotated portions of signal only with events\_from\_annotations but how to add the type 0 events on the remaining signal excluding the annotations ?
3. other nice way ?  
Thank you for your help
