-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add error message when conversion of EEG locs to head space fails #11080
Merged
Conversation
This file contains 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
When calling `.set_montage()`, all digitized points are transformed into head coordinate space if possible. This is not possible when there are no fiducials and the original points are not in head space already. MNE-Python is lenient when the coordinate space of the original points is marked as "unknown", assuming they are in head space. However, when the points are explicitly marked as being in some other space (e.g. MRI), then they will not get converted without fiducials. Since MNE-Python requires all EEG channel positions to be in head space, we should raise an error when `.set_montage()` fails to do this. Fixes mne-tools#10946.
Can you add a test? I think the |
Thanks @wmvanvliet ! |
Let's revert this until we can get MNE-BIDS sorted. |
wmvanvliet
added a commit
to wmvanvliet/mne-python
that referenced
this pull request
Aug 28, 2022
…ails (mne-tools#11080)" This reverts commit bdc435d.
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Aug 29, 2022
* upstream/main: (366 commits) BUG: Spectrum deprecation cleanup [circle deploy] (mne-tools#11115) Add API entry list and map (mne-tools#10999) Add legacy decorator (mne-tools#11097) [ENH, MRG] Add time-frequency epoch source estimation (mne-tools#11095) Revert "Add error message when conversion of EEG locs to [circle deploy] (mne-tools#11104) MRG: Fixes for mne-tools#11090 (mne-tools#11108) add test for edf units param (mne-tools#11105) BUG: Improve logic for bti (mne-tools#11102) add spectrum class (mne-tools#10184) ENH : add units parameter to read_raw_edf in case units is missing from the file (mne-tools#11099) ENH: Add temperature and galvanic (mne-tools#11090) Add error message when conversion of EEG locs to head space fails (mne-tools#11080) DOC: removed unnecessary line in PSF example (mne-tools#11085) FIX: Update helmet during ICP (mne-tools#11084) Fix various typos (mne-tools#11086) DOC: Rel BUG: don't assume that channel info contains particular keys (mne-tools#11074) [BUG] Fix plot_topomap with sphere="eeglab" (mne-tools#11081) Add `vmin` and `vmax` specification to `mne.Evoked.animate_topomap` (mne-tools#11073) Add _on_missing functionality to UpdateChannelsMixin (mne-tools#11077) ...
larsoner
added a commit
to larsoner/mne-python
that referenced
this pull request
Aug 30, 2022
* upstream/main: (25 commits) DOC: Exclude some implicit refs in doc build (mne-tools#10433) MAINT: Better issue forms (mne-tools#11101) [FIX] Typo in example (mne-tools#11118) [MRG] Improve interpolation of bridged electrodes (mne-tools#11094) BUG: Spectrum deprecation cleanup [circle deploy] (mne-tools#11115) Add API entry list and map (mne-tools#10999) Add legacy decorator (mne-tools#11097) [ENH, MRG] Add time-frequency epoch source estimation (mne-tools#11095) Revert "Add error message when conversion of EEG locs to [circle deploy] (mne-tools#11104) MRG: Fixes for mne-tools#11090 (mne-tools#11108) add test for edf units param (mne-tools#11105) BUG: Improve logic for bti (mne-tools#11102) add spectrum class (mne-tools#10184) ENH : add units parameter to read_raw_edf in case units is missing from the file (mne-tools#11099) ENH: Add temperature and galvanic (mne-tools#11090) Add error message when conversion of EEG locs to head space fails (mne-tools#11080) DOC: removed unnecessary line in PSF example (mne-tools#11085) FIX: Update helmet during ICP (mne-tools#11084) Fix various typos (mne-tools#11086) DOC: Rel ...
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.
When calling
.set_montage()
, all digitized points are transformed into head coordinate space if possible. This is not possible when there are no fiducials and the original points are not in head space already. MNE-Python is lenient when the coordinate space of the original points is marked as "unknown", assuming they are in head space. However, when the points are explicitly marked as being in some other space (e.g. MRI), then they will not get converted without fiducials.Since MNE-Python requires all EEG channel positions to be in head space, we should raise an error when
.set_montage()
fails to do this.Fixes #10946.