how to find epochs indexes of dropped epochs? (out of bound index error)

Hi,
I have only 79 epochs (the shape of epochs_emg1 is (79, 2, 4353)),
but when I select the epochs to get their indexes, I have indexes more than 79.

epochs_emg1 = mne.Epochs(Raw_subset, events=events, tmin=-1.0, tmax=7.5, event_id={'imr':event_dict['imr']},
                    baseline=None, preload=True) 
epochs_emg1.get_data().shape
indexes = epochs_emg1.selection
indexes 

array([ 4, 19, 34, 49, 64, 88, 94, 106, 127, 137, 158,
179, 182, 203, 215, 227, 245, 269, 278, 288, 312, 330,
333, 357, 363, 387, 399, 414, 426, 451, 454, 469, 487,
499, 520, 532, 544, 565, 586, 590, 614, 623, 638, 662,
665, 680, 701, 716, 737, 750, 765, 771, 786, 804, 828,
834, 855, 864, 888, 901, 910, 931, 943, 961, 976, 994,
1003, 1012, 1036, 1055, 1064, 1082, 1097, 1103, 1124, 1139, 1148,
1175, 1187], dtype=int64)

Hello and welcome to the forum!

I created this array and looked at its .shape, and I get the expected (79,). So I don’t exactly understand your question?

You may also want to look at epochs_emg1.drop_log and epochs_emg1.plot_drop_log().

Best wishes,
Richard