-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Added a TODO to start implementation of HED support in annotations #13059
base: main
Are you sure you want to change the base?
Conversation
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
1d5fa0b
to
c31e837
Compare
ch_names=None, | ||
): | ||
hed = _soft_import("hedtools", "validation of HED tags in annotations") # noqa | ||
# TODO is some sort of initialization of the HED cache directory necessary? |
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.
orig_time=orig_time, | ||
ch_names=ch_names, | ||
) | ||
# TODO validate the HED version the user claims to be using. |
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.
f"Number of HED tags ({len(hed_tags)}) must match the number of " | ||
f"annotations ({len(self)})." | ||
) | ||
# TODO insert validation of HED tags here |
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.
def append(self, onset, duration, description, ch_names=None): | ||
"""TODO.""" | ||
pass | ||
|
||
def count(self): | ||
"""TODO. Unlike Annotations.count, keys should be HED tags not descriptions.""" | ||
pass | ||
|
||
def crop( | ||
self, tmin=None, tmax=None, emit_warning=False, use_orig_time=True, verbose=None | ||
): | ||
"""TODO.""" | ||
pass | ||
|
||
def delete(self, idx): | ||
"""TODO.""" | ||
pass | ||
|
||
def to_data_frame(self, time_format="datetime"): | ||
"""TODO.""" | ||
pass |
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.
@VisLab these TODOs are for me. So as you can see some things aren't going to work yet, but we're already at least able to do:
$ ipython
In [1]: import mne
In [2]: foo = mne.HEDAnnotations([0, 1], [0.5, 1.2], ['foo', 'bar'], ['hed/foo', 'hed/
...: bar'])
In [3]: foo
Out[3]: <HEDAnnotations | 2 segments: hed/bar (1), hed/foo (1)>
In response to #11519
Added a TODO to annotations.py as agreed to get started on implementation of basic-level HED (Hierarchical Event Descriptors) support in mne annotations to allow HED tags to be used in epoching.