Skip to content
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

Read MIT Annotations #13030

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

withmywoessner
Copy link
Contributor

Reference issue (if any)

Fixes #12660.

What does this implement/fix?

Adds the ability to read WaveForm Database (wfdb) annotations using the already existing library. My proposed API adds two new parameters to mne.read_annotations() fmt and suffix. fmt and suffix are used in combination to read an annotation whose file suffix is not strictly defined.
If mne.annotations(fmt='wfbd'...) is called with no suffix, then the function will check to see if the suffix matches a default list of suffixes.
If mne.annotations(fmt='wfbd', suffix='seizures'...) is called, then the function will bypass the default list of suffixes.

@larsoner larsoner added this to the 1.10 milestone Dec 16, 2024
@withmywoessner
Copy link
Contributor Author

Hi @drammock and @larsoner, I know you mentioned reading the annotations using a predefined list of suffixes in #12660, but I thought it would be useful to also allow for the option to read files using any suffix. Let me know if you prefer otherwise.

Co-authored-by: Eric Larson <[email protected]>
@withmywoessner
Copy link
Contributor Author

withmywoessner commented Dec 16, 2024

Where is the best place to list the suffix mappings @larsoner? The WFBD library mentions a few that I would also like to include besides .seisuzes.

@larsoner
Copy link
Member

Where is the best place to list the suffix mappings @larsoner?

Looks like the mapping currently lives here

readers = {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add reader for annotations in MIT format
2 participants