Automatic and unexplained dropping of epochs

Hello,

Let’s say I create an epoch object like this:

epochs = mne.Epochs(raw, events, event_dict, tmin=-0.2, tmax=0.998, baseline=None, reject_by_annotation=False)

then I try to load the data:
epochs.load_data()

In the latter process, some epochs (a lot of epochs actually!) are dropped automatically. The reason is obscure to me. They even disappear from the drop_log.

What could be the reason?

Thanks a lot in advance,

Giulia

hard to say why without the console output, the data file, and a reproducible code snippet. One reason that epochs might be automatically dropped is if they are too close to the beginning or end of the recording. So given tmin=-0.2, tmax=0.998 you will lose any epochs where the event marker is earlier than time 0.2 or later than 0.998 s prior to the end of the object.

Hello @giuliagennari,

can you share with us the contents / output of:

  • epochs.reject
  • epochs.flat
  • epochs.drop_log and
  • epochs.plot_drop_log()

please?

Your comment inspired some sanity checks which indeed revealed that there was a problem in the way I was using the event times. Thanks a lot!!! :blush:

Thank you very much Richard, for your response and availability! I could solve the problem in the meantime.