Repository navigation
reref: average reference in double precision, as in EEGPrep - #998
Merged
Merged
Conversation
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Collaborator
Author
|
Full parity test with this branch (EEGLAB develop 4405bab + this commit, clean_rawdata 2.12, MATLAB R2025b) against EEGPrep develop 4df5bbe8, 13 recordings, 7 steps:
DetailsThe sample counts after clean_rawdata change for every subject (for example sub-001 185,480 instead of 187,971), so the reference table of sccn/eegprep_parity_test was regenerated: https://github.com/sccn/eegprep_parity_test/commit/4e1c55d — orchestrator |
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.
The average reference of
reref.mis now computed in double precision and cast back to the class of the data:single(double(X) - mean(double(X),1))for single precision data. Before, it multiplied the single precision data by the matrixeye(n) - 1/n, whose result depends on the BLAS library of the machine, so MATLAB and EEGPrep (which averages in float64 since sccn/eegprep#606) could differ by a fraction of a microvolt and clean_rawdata then kept different samples.Only the average reference branch changes. A reference to one or several channels and the Huber average are unchanged. Double precision data give the same result as before up to roundoff.
Checks in MATLAB R2025b on this Mac:
pop_reref(EEG, [])equalssingle(double(X) - mean(double(X),1))exactly (0 differing values), and the data stay single.'exclude'leaves the excluded channels untouched, and a reference to one channel still works.Consequence: the sample counts after clean_rawdata in the published parity table change (for example sub-001 keeps 185,480 samples instead of 187,971), so the reference table of sccn/eegprep_parity_test is regenerated with this change. Related: sccn/clean_rawdata#51, sccn/eegprep#832, sccn/eegprep#833 (closed in favour of this).
🤖 Generated with Claude Code