- MNE version: 1.3.0
- operating system: macOS 12
events_from_annot, event_dict = mne.events_from_annotations(raw,event_id='auto').
events_from_annot = mne.find_events(raw)
print(events_from_annot[:10])
print("event_dict.....",event_dict)
reject_criteria = dict(eeg=100e-6)
epochs = mne.Epochs(raw, events_from_annot, tmin=-0.1, tmax=1.6,
reject=reject_criteria, baseline = (None,0), preload=True, picks=['eeg'])
Raw data is collected from .mat file in numpy array and then converted into RAW object in mne.
Above code is giving errors while getting events from raw data as follows-
ValueError Traceback (most recent call last)
in
1 events_from_annot, event_dict = mne.events_from_annotations(raw,event_id=‘auto’)# Get events and event_id from an Annotations object.
----> 2 events_from_annot = mne.find_events(raw,‘STI 014’)
3 print(events_from_annot[:10]) # show the first 10
4
5 print(“event_dict…”,event_dict)
in find_events(raw, stim_channel, output, consecutive, min_duration, shortest_event, mask, uint_cast, mask_type, initial_event, verbose)
/usr/local/lib/python3.8/dist-packages/mne/event.py in find_events(raw, stim_channel, output, consecutive, min_duration, shortest_event, mask, uint_cast, mask_type, initial_event, verbose)
701 picks = pick_channels(raw.info[‘ch_names’], include=stim_channel)
702 if len(picks) == 0:
→ 703 raise ValueError(‘No stim channel found to extract event triggers.’)
704 data, _ = raw[picks, :]
705
ValueError: No stim channel found to extract event triggers.
Can I get help on solving this issue?