How to access different conditions in metadata

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

  • MNE version: 0.24.0
  • operating system: Windows 10

Hi! I have data of different events eg. “X/XC2/Ambiguous/Congruent/Ambiguousblock” which are the names of events in “row event”. They have an additional condition; verbal or visual, that I want to separate the conditions according to.

When I try:
"ambig_epochs = epochs[“Ambiguous"and"Visual”] it says that “Visual” is not defined. It exists in the metadata under heading “first_Cue”. I can’t add the name visual to the event tag because it is not recognised in the raw data I guess. I tried remapping event names, making new meta data to combine the events with the conditions but it doesn’t work.

Anyone know a quick way to select the visual/verbal condition according to the event type?

Thanks in advance!

I don’t know if I understand your metadata structure correctly, but if this info is contained in the “first_Cue” column, then something like this should work:

visual_epochs = epochs["first_Cue == 'Visual'"]
ambiguous_epochs = epochs["first_Cue == 'Ambiguous'"]
2 Likes