Repository navigation
[IO] Keep MNE montage electrode positions on import - #845
Conversation
There was a problem hiding this comment.
If your organization's extra usage balance is empty, an organization admin can add extra usage credits at claude.ai/admin-settings/usage. If its monthly spend limit was reached, an admin can raise it on the same page. If neither applies, contact Anthropic support.
Once extra usage is available, someone with write access to this repository can comment @claude review on this pull request to trigger a review.
|
Claude finished @claude[bot]'s task in 59s —— View job Code review
BlockingNone. ImportantNone. NitsNone. Test gapsNone. The new test checks every derived field against EEGLAB parity notes
I didn't run the tests locally because the sandbox doesn't allow Checked for correctness bugs, EEGLAB parity, data structure compatibility, changed-behavior tests, and CLAUDE.md/AGENTS.md compliance. |
|
Review (Claude Fable): needs more work
DetailsReviewed head: What is needed before merge
Comparison with EEGLAB ( EEGLAB copies the FieldTrip positions as they are (lines 282 to 291), stores the unit in
CI. One failure, on Windows: Other open pull requests. No conflict with #841 (same file, other lines). #857 also appends tests at the end of Edge case checked. The real — orchestrator review |
mne_raw_to_eeg now copies each channel's MNE head-frame position into chanlocs X, Y, Z (metres, EEGLAB +X nose frame), matching MNE's EEGLAB export, so eeg_checkchanlocs fills theta, radius and spherical fields. Fixes #840 Co-Authored-By: Claude Opus 5.5 <[email protected]>
dff9be3 to
a7c90ca
Compare
|
This branch is rebased on the current develop, after the MNE reader of #813. Each channel keeps its type from that reader (EEG, EOG, STIM), the new test skips when MNE is not installed, and the two sentences that said the montage coordinates were omitted are removed (in Arno accepted that the positions X, Y and Z are stored in metres, as MNE gives them, with no unit recorded in the dataset. The angles ( I compared the result with EEGLAB in MATLAB R2025b on — orchestrator |
mne_raw_to_eegnow copies each channel's MNE head-frame position into chanlocs X, Y and Z in metres, rotated to EEGLAB's +X nose frame as MNE's EEGLAB export does, soeeg_checkchanlocsfills theta, radius and the spherical fields. Channels without a position stay empty, and each channel keeps its type (EEG, EOG, STIM and so on). Adds a standard_1020 landmark test checked againsteeg_mne2eeg, and removes the two sentences of the documentation that said the coordinates were omitted.Comparison with EEGLAB in MATLAB (R2025b, EEGLAB
d558d701c,pop_loadsetofsample_data/eeglab_data.set, againstmne.io.read_raw_eeglabfollowed bymne_raw_to_eegon heada7c90ca0):thetadifferenceradiusdifferenceX, Y and Z are stored in metres as MNE gives them, and no unit is recorded in the dataset.
theta,radius, scalp maps, interpolation and ICLabel do not depend on that scale. Arno accepted this on November 28, 2026. The data samples are not touched by this change.How the comparison was run
MATLAB:
EEG = pop_loadset('sample_data/eeglab_data.set'), thenlabels, X, Y, Z, theta, radiusofEEG.chanlocswritten to a CSV file (EEG.chaninfo.nosediris+X). Python: the same file read withmne.io.read_raw_eeglab, converted withmne_raw_to_eeg, and the chanlocs compared channel by channel with the CSV file. Local tests on the rebased branch:tests/test_stream9_readers.py,tests/test_eeg_mne2eeg.pyandtests/test_package_help.py, 28 passed.Fixes #840
🤖 Generated with Claude Code