mne-tools / mne-tools/mne-python
persyst annotations error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
Describe the bug
The persyst raw file function is able to open the persyst files and annotations with no issues. The issue I am having. For my particular use case we need to get all annotations regardless if they are repeated. When some of the EEG systems generate annoations they use xlevents or xlspikes and sometimes they can be multiple of these in the files. however the parser is only taking unique annotations. So if a human annotator or machine annotator uses same annotations then the parser is not picking up all of the annotations but rather unique names or the first one with that name.
Steps to reproduce
Open any lay/dat files that have annotations with different times and same name/description
Expected results
The expected behavior is that the parser should be able to pick up all annotations even if they have the same name.
Actual results
only picks up the first annotation with that name.
Additional information
If I have time I can try to submit a suggestion on how to fix it.
I think the issue is that you are using the comment texts as keys for your dictionary of annotations. So when your script finds a new comment with the same text is overwriting the previous one. Perhaps one suggestions to append the values to your keys as a list if the keys are already in the dictionary.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Persyst raw-file annotation parser and reproduce the issue using a lay/dat file containing annotations with different times but the same name or description. Verify that the completed change preserves every annotation, including repeated xlevents or xlspikes, rather than retaining only the first or unique name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100