You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pipeline crashes if there is not an annotation structure already created in the data. Error here:
File "/scratch/tk11br/TRI-pipeline/env/lib/python3.10/site-packages/mne/preprocessing/artifact_detection.py", line 471, in annotate_break
raise ValueError('Could not find (or generate) any annotations in '
ValueError: Could not find (or generate) any annotations in your data.
I fixed this personally by doing this:
annos = mne.annotations_from_events(events=mne.find_events(raw, initial_event=True),
sfreq=raw.info['sfreq'],
orig_time=raw.info['meas_date'])
raw.set_annotations(annos)
Likely needs to be fixed before the initial release.
The text was updated successfully, but these errors were encountered:
You should also be able to pass config['find_breaks'] = False to skip this step.
I made the find_breaks behavior True by default because when I used MATLAB Lossless, finding breaks was not done by default, and this is something I always needed to do (but often forgot) which resulted in having to re-run the pipeline.
The default for annotate_break is to look for annotations, alternatively, you can pass in an event array (or set your annotations from your stim channel as you did).
But I agree that we might want to handle a situation like yours more gracefully.
When passing
find_breaks
to the pipeline like the following:The pipeline crashes if there is not an annotation structure already created in the data. Error here:
I fixed this personally by doing this:
Likely needs to be fixed before the initial release.
The text was updated successfully, but these errors were encountered: