Is there a function to show the number of occurrences of each Event ID?

  • MNE-Python version: 0.22.0
  • operating system: windows10

Hey! guys, I’m wondering is there a function to show the number of occurrences of each Event ID?

I assigned 1-192 to the responses to 192 pictures, respectively, but when I write this code:

eve_resp_pic = mne.pick_events(events_recall, include=list(range(1,193)))
print(len(eve_resp_pic))

it returned 194 instead of 192, I want to check which event id occured more than once, any suggestions?

what does np.unique(events_recall[:, 2]) and np.unique(events_recall[:, 2]).size give you?

Alex

Hi – you can use np.unique with return_counts = True

Mainak