Hi Dan,
Thanks for your comment and sorry for the confusion. Iâm reading my post again and I can see how difficult it is to follow the issue so Iâll try to be clearer here. Hereâs the code Iâm using to create the epochs:
DATA_ROOT = '../data'
RAW_DATA = '../raw_data'
FILE_PREFIX = 'PRODRIGUEZ_'
SUBJECT=10
raw = mne.io.read_raw_brainvision("{}/S{}/{}{:06d}.vhdr".format(RAW_DATA, SUBJECT, FILE_PREFIX, SUBJECT), preload=True, eog={'EOG1', 'EOG2'})
events = mne.events_from_annotations(raw, event_id='auto', regexp='Stimulus/') # 'Stimulus/' is the prefix the recording software uses for events
# I have stimuli that can be either present or absent, participants can either see them or not, and can also be localized at the left or right
event_dict = {'Present/Seen': 55,
'Absent/Unseen': 56,
'Absent/Seen': 57,
'Present/Unseen': 59,
'Right': 75,
'Left': 74}
epochs = mne.Epochs(raw, events=events[0], event_id=event_dict, tmin=-2.0, tmax=2.0, baseline=None, preload=True, on_missing='warn')
When I check my epochs, I have the following events:
Out[7]:
<Epochs | 1495 events (all good), -2 - 2 sec, baseline off, ~2.81 GB, data loaded,
'Present/Seen': 445
'Absent/Unseen': 293
'Absent/Seen': 7
'Present/Unseen': 152
'Right': 299
'Left': 299>
What I need is, for example, to select the events that correspond to all of the âPresentâ stimuli, easily done with:
In [8]: epochs['Present']
Out [8]:
<Epochs | 597 events (all good), -2 - 2 sec, baseline off, ~1.12 GB, data loaded,
'Present/Seen': 445
'Present/Unseen': 152>
But also those that are either âRightâ or âLeftâ. If I try epochs['Present', 'Right']
I get:
In [9]: epochs['Present', 'Right']
Out [9]:
<Epochs | 896 events (all good), -2 - 2 sec, baseline off, ~1.68 GB, data loaded,
'Present/Seen': 445
'Present/Unseen': 152
'Right': 299>
My problem here is that I believe I should have a maximum of 597 âRightâ stimuli, which would correspond to those also belonging to âPresentâ. But what is going on (or at least this is what I understand) is that I get all of the âPresentâ stimuli but also all of the âRightâ ones, including those that are âAbsentâ. Is there a way to select only those âRightâ stimuli that are also âPresentâ?
Thanks again!