Closed choldgraf closed 5 years ago
Annotations
are read/written from/to FIF. So Dataframe conversion/use is probably a no-go.
so that means that there's just no possibility for a more rich representation of metadata for task data, other than having lots and lots of event codes?
@kingjr can you send me a link to the MEG data you were talking about? I can try to set up a use-case example
You mean MNE-HCP? You have to create an account on HCP and aws :/ maybe this isn't appropriate actually. cc @dengemann
On 30 March 2017 at 12:28, Chris Holdgraf notifications@github.com wrote:
@kingjr https://github.com/kingjr can you send me a link to the MEG data you were talking about? I can try to set up a use-case example
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mne-tools/mne-python/issues/4125#issuecomment-290465712, or mute the thread https://github.com/notifications/unsubscribe-auth/AEp7DFShR-q7QHUOci0Fik7Oa7ZjEuKdks5rq9g4gaJpZM4MtpOD .
@jona-sassenhagen didn't you recently post a link to some data, or description of some data, that would work well for the "rich event description"? I tried searching my emails but failed to find it.
here
http://nbviewer.jupyter.org/gist/jona-sassenhagen/ b1fca57f72e36b8c225d0315b18a0206
I'm closing this, with metadata + examples in. Hope that's ok.
Todo
It seems a few of us have had conversations about how to include more rich metadata about the world in MNE objects. Currently we only have events objects, which give us only onset + event ID, as well as
Annotations
which tell us onset + duration + a string. There are many instances where we want more than just a string to describe one event.Why not allow for the
Annotations
class to take a list of dictionaries as well, where each dictionary could have an arbitrary number ofkey: val
pairs that would describe metadata for a given event. You could ensure that keys are always strings, and the values are one ofstr, int, float, date
or something like this.Then you could write a
to_dataframe
function that would build a pandas dataframe using the information that's inAnnotations
, which would let you do queries in intelligent ways. In a future PR, you could also imagine writing some kind ofquery
method that would satisfy the query conditions and return a list of which Annotations match this, and could be easily exportable to an MNE events object.