-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[MRG+1] Unify read annotations #5695
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
Conversation
mne/annotations.py
Outdated
| with ff as fid: | ||
| annotations = _read_annotations(fid, tree) | ||
| # XXX: I've issues with circular imports | ||
| from mne.io.brainvision.brainvision import _read_annotations_brainvision_caller |
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.
I would remove the _caller
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.
I'm not sure. What I think it should be done is unify them all.
I would propose to remove all the Annotation construction of the readers and delegate it here to mne.annotations.read_annotations. In this manner, all readers should have a function _read_annotations_XX (or parse or whatever) which does know about the file format and returns valid onsets, duration, description and orig_time. And remove the import Annotations.
However, this would be easier when read_annotations_eeglab is no longer there, and the synthesis of the stim channel is removed from the edf reader.
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.
but meanwhile, I'll just remove the callers.
|
Yes let’s remove it
|
b72f1c0 to
b8c1d22
Compare
Codecov Report
@@ Coverage Diff @@
## master #5695 +/- ##
==========================================
- Coverage 88.51% 88.51% -0.01%
==========================================
Files 369 369
Lines 69136 69148 +12
Branches 11645 11651 +6
==========================================
+ Hits 61193 61203 +10
- Misses 5089 5090 +1
- Partials 2854 2855 +1 |
8c33052 to
243119c
Compare
243119c to
97a40d9
Compare
38cbc19 to
a852bc4
Compare
|
If you guys think that:
then feel free to merge. |
|
CIs are not happy, let me know when they are and I can take a look |
|
Marking this for 0.17 |
|
Is the TODO list at the top outdated, as there are things incomplete in the list |
Fixes #5670
Things to do:
rst - Add function :func:`mne.io.read_annotations_eeglab` to allow loading annotations from EEGLAB files, by `Alex Gramfort`_`