-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Annotations metadata #13213
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
Annotations metadata #13213
Conversation
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@matthiasdold this should help with mne-tools/mne-bids#1389 and NeuroTechX/moabb#744 :) |
@sappelhoff what do you think about this implementation? And do you know what the issue is with the "Ultraslow_PG" test? The log is quite cryptic... |
I don't understand why |
It would be good if @britta-wstnr and/or @eioe could weigh in here, based on this comment. Sadly I don't recall the details of that conversation, but maybe one of them does! @PierreGtch one specific question I have is why it is necessary for the metadata attached to an annotation to be a dataframe rather than a dict --- if the goal is "populate |
Hi, I do not recall the discussion en detail as well, but I think the most relevant arguments are outlined in #12208 . |
@drammock it is not necessary for the
In mne-bids, when reading raw recordings with events in an associated |
on this point,
Wow, I'd forgotten about all of that back-and-forth. @PierreGtch now that I've been reminded of all the past thinking / prototyping we did on this issue, WDYT about following the design described in #12208 (comment) and #12208 (comment) ? |
@drammock Yes, a list of dict seems like a perfect option! Regarding the name of the attribute, like @eioe, I now prefer And to prevent users from editing in place the list or dicts, we could return a deep copy in the property. WDYT? |
That would indeed preserve the fidelity of the attached data. But it wouldn't prevent users from trying to edit the data and thinking that it worked and then being confused when the data they manually added is mysteriously not there. That's not a good UX. |
Closing in favour of #13228, which follows the recommendations in this #13213 (comment) |
Reference issue (if any)
Closes #13199
What does this implement/fix?
This PR adds a
metadata
attribute to theAnnotation
objects.I saw that #12213 was initially going in a similar direction but did not implement it in the end, not sure why.
Additional information
As mentioned in #13199, this feature is relevant when we need more information to describe the events than just timing and name.