-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optionally return event_id dict from read_raw_bids, and use value column from events file if present #1349
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1349 +/- ##
==========================================
+ Coverage 97.42% 97.43% +0.01%
==========================================
Files 40 40
Lines 8883 8903 +20
==========================================
+ Hits 8654 8675 +21
+ Misses 229 228 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @drammock
# when making our `event_id` dict; `value = n/a` doesn't prevent annotation) | ||
culled = _drop(events_dict, "n/a", "value") | ||
event_id = dict( | ||
zip(culled[trial_type_col_name], np.asarray(culled["value"], dtype=int)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@drammock I think this is causing a failure in mne-bids-pipeline
Can you look? You should be able to do pytest mne_bids_pipeline/ -k matching --download
to test
PR Description
closes #223
I opted for @hoechenberger's suggestion in #223 (comment), namely, to allow
read_raw_bids
to optionally return anevent_id
dict; when avalues
column is present inevents.tsv
it will use those values for the integer IDs. That dict can then be passed tomne.events_from_annotations
to recover the original events array.Merge checklist
Maintainer, please confirm the following before merging.
If applicable: