mne-tools / mne-tools/mne-python
Nice-to-have: Exporting during EDF should check the distribution of data values
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.5k
- Forks
- 1.6k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 100
Description
When exporting an EDF file, right now the physical ranges are set such that they are the min/max of each channel groups.
However, if you accidentally set a non-EEG channel as EEG, then it can potentially throw off the physical ranges for the EEG channel group, thus resulting in a badly exported dataset.
Say channel $A1 has values -1000 to 1000, and is obviously not EEG, but should be "misc".
But say all EEG channels have physical range ~0.01 to 0.03. Then the divisor is 5 orders of magnitude larger because the EEG channel group physical range will be (-1000, 1000), thus making the data un-interpretable when reading it back.
This requires the user to explicitly make sure they're not setting some of their channel types incorrectly.
Proposed Fix
We need to make sure none of the data is significantly different range then others.
I'm making this an issue becuz don't know how to solve it for now, and maybe it won't become an issue?
Originally posted by @adam2392 in https://github.com/mne-tools/mne-python/pull/9694#discussion_r696099981
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 by tracing the EDF export path and the calculation of physical ranges for channel groups. Review the discussion linked in the issue for context, then determine how significantly different channel values should be identified and what the exporter should do when they are found; the issue does not currently define a test or completion criterion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100