# Unexpected event\_id's in my epochs

**URL:** <https://mne.discourse.group/t/unexpected-event-ids-in-my-epochs/9086>\
**Category:** Support & Discussions\
**Tags:** epochs\
**Created:** [July 18, 2024, 1:38pm UTC](https://mne.discourse.group/t/unexpected-event-ids-in-my-epochs/9086 "2024-07-18T13:38:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samvb](https://avatars.discourse-cdn.com/v4/letter/s/ecb155/32.png) [@Samvb](https://mne.discourse.group/u/Samvb)\
**Post date:** [July 18, 2024, 1:38pm UTC](https://mne.discourse.group/t/unexpected-event-ids-in-my-epochs/9086/1 "2024-07-18T13:38:41Z")

</div>

- MNE version: 1.5
- operating system: Windows 10

This is my first time posting, so I hope I gave you all the relevant information. I have some unexpected event\_id’s in my epochs.

I have an event array (events: 2960, 3); colums: latency, x, trigger respectively). I am selecting epochs based on trigger 999 and 998: tmin, tmax = -0.95,0.05.

Importantly, trigger 999/8 should not be preceded within 1000ms by any trigger.

But when I use:

```python
tmin, tmax = -0.95,0.05
decim=4
SS_TFEpochs = mne.Epochs(raw_MT_ref, events=events, event_id = dict(SS=999), tmin=tmin, tmax=tmax, baseline=None, preload=True, picks='eeg',decim=decim)
SS_TFEpochs.plot(events=events)

```

I get:

 ![epochs](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/0/0a0dfa7b7e09f2fbca799b2b5cc0e899cde86013.jpeg)

If I remove decim I get even more 103 events preceding trigger 999.

From the event list I confirmed (I believe) that there shouldn’t be any triggers (103) in the 1 second time-window before trigger 999/8:

```python
for idx, event in enumerate(events):
    trigger = event[2]
    
    # Check for the specific situation where 998/999 (go-signal) is preceded by 103 (stop-signal) within 1 second
    if trigger in [998, 999]:
        if idx > 0 and events[idx - 1][2] == 103:
            latency_diff = event[0] - events[idx - 1][0]
            if latency_diff < 1000:
                print(f"Error: {trigger} at latency {event[0]} is preceded by 103 within {latency_diff} ms. This isn't supposed to happen.")

```

I am probably missing something obvious, but I can’t seem to find the issue.

Cheers,  
Sam
