How to split the data without mark and with different rest time into epoch

My data looks like this: Every 10 minutes of eeg recording and 2-3 minutes of rest time. But there is no mark.
How do I divide the data into 4 epochs of 10 minutes?

I have tried to write my own marks, I have written four marks of 0, 10 minutes + x minutes, 20 minutes + x minutes, 30 minutes + x minutes.
But when I read the mark and segment the epoch, I get a bad segment error, but I don’t set any bad segment. Also I tried a small time period like tmax=10 seconds and it still reports the same error.

events = mne.read_events(’/mark1.txt’)

tmin,tmax = -0.1,6000
baseline = (None, 0.0)
Epochs = mne.Epochs(raw, events=events,event_id = event_id,
tmin=tmin,
tmax=tmax,
baseline=baseline,
preload = True

                )

4 matching events found
Setting baseline interval to [-0.1, 0.0] sec
Applying baseline correction (mode: mean)
0 projection items activated
Loading data for 4 events and 300051 original time points …
1 bad epochs dropped

I would like to ask if anyone can help me? Thank you very much for your help!

If you have a question or issue with MNE-Python, please include the following info:

  • MNE-Python version: 0.24
  • operating system: ubuntu20.04

Hello @elvisjade,

since your first event occurs at time point 0 and you try to start epoching before that event (tmin = -0.1), the respective epoch will be dropped / cannot be created, as there’s simply no data available.

Best wishes,
Richard

1 Like

Ah, so that’s how it is.
I’m sorry I didn’t notice this detail.
Thank you very much for your help!