Repository navigation
ENH: Allow overriding existing EDF channel units - #14567
Open
divya-git03 wants to merge 1 commit into
Open
divya-git03 wants to merge 1 commit into
divya-git03 wants to merge 1 commit into
Conversation
divya-git03
requested review from
agramfort,
drammock and
larsoner
as code owners
November 19, 2026 14:22
|
Hello! 👋 Thanks for opening your first pull request here! ❤️ We will try to get back to you soon. 🚴 |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses #14427 by allowing users to override existing channel units specified in EDF file headers when reading data with
mne.io.read_raw_edf().Previously, the
unitsparameter could only be used when channel units were missing from the original EDF header. This change allows users to explicitly override those units.Changes
unitsto override units for all non-STIM channels.Tests
Added and updated regression coverage for:
Updated the existing
test_ch_typesexpectation to reflect the new EDF behavior.Validation
pytest mne/io/edf/tests/test_edf.py -q— 78 passed, 35 skipped.pytest mne/tests/test_docstring_parameters.py -q— 14 passed, 5 skipped.pre-commit run --files ...— passed.git diff --check— passed.python -m py_compile mne/io/edf/edf.py— passed.Dataset-dependent tests were skipped because the MNE testing dataset was unavailable. Documentation tests requiring optional dependencies were also skipped.
Closes #14427.