I would like to see additional event types that were not used to create epochs in the epochs plot. This is possible, as @drammock has shown with his MWE:
import mne
folder = mne.datasets.sample.data_path()
file = folder / 'MEG' / 'sample' / 'sample_audvis_raw.fif'
raw = mne.io.read_raw_fif(file)
events = mne.find_events(raw, stim_channel='STI 014')
epochs = mne.Epochs(
raw,
events,
event_id={'auditory/right': 2},
preload=True,
proj=False
)
epochs['auditory/right'][4:10].plot(events=events)
This shows event type 32 in some epochs, even though only event type 2 was used for epoching.
When I try to replicate this with a different data set (available here), I do not see any extra events:
import mne
raw = mne.io.read_raw_eeglab("6_N400_preprocessed.set", preload=True)
fs = raw.info["sfreq"]
raw.filter(0.2, None)
raw.filter(None, 20)
events, _ = mne.events_from_annotations(raw, event_id=lambda x: int(x))
events = mne.merge_events(events, [111, 112], 111) # prime related
events = mne.merge_events(events, [121, 122], 121) # prime unrelated
events = mne.merge_events(events, [211, 212], 211) # target related
events = mne.merge_events(events, [221, 222], 221) # target unrelated
events = events[2:] # discard first two events
event_id = {
"prime/related": 111,
"prime/unrelated": 121,
"target/related": 211,
"target/unrelated": 221
}
epochs = mne.Epochs(raw, events, event_id, tmin=-0.2, tmax=1.8)
epochs[:5].plot(events=events)
I’d expect to see events of type 201
(correct
) or 202
(incorrect
) at the end of each epoch, but there is nothing:
>>> events[:7]
array([[1327, 0, 121],
[1550, 0, 221],
[1663, 0, 201], # <-- within epoch 1
[1900, 0, 121],
[2160, 0, 221],
[2260, 0, 201], # <-- within epoch 3
[2507, 0, 111]])
- MNE version: 1.4.dev0
- OS: macOS 11.7.3