Repository navigation
Conversation
Use the difference between the digital extrema for calibration. Counting both endpoints as an additional interval introduces a systematic gain and offset error. Test real generated EDF endpoint samples and compare physical IO reads against pyedflib instead of repeating the incorrect denominator.
Contributor
|
@JuliaSprenger, it appears you wrote the initial implementation here and I don't know this reader at all, so could you look over this? |
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.
EDFRawIO divides the physical range by
digital_max - digital_min + 1, introducing a gain and offset error. The EDF specification defines corresponding physical and digital endpoints, so the denominator needs the difference between those endpoints. For an identity range of -8092 to 8092, a stored value of -5 currently reads as approximately -5.49966 rather than -5.Remove the extra interval. Add generated EDF regressions for identity, asymmetric and full16bit calibration, both output dtypes and reordered/subset channels. Update the existing EDFIO comparison to use PyEDFlib physical reads rather than repeating the old denominator.
Validation: 632 native core/calibration tests and six subtests pass; Black passes. Thirteen external-fixture tests are skipped because the GIN fixture downloads return HTTP403. The existing EDFIO comparison method also passes on an explicitly generated five-channel fixture. Recorded EEGMMIDB S001/R04 samples now agree exactly with independent EDF decoding across 16 raw/eager/lazy conversions; raw integers, timestamps and channel ordering stay unchanged.
The contributor-list commit is shared with #1919. The two runtime fixes are independent.