-
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
Deprecate read_montage and class Montage #6764
Conversation
d0c3c8e
to
d43a8a8
Compare
Codecov Report
@@ Coverage Diff @@
## master #6764 +/- ##
=========================================
- Coverage 89.64% 89.6% -0.05%
=========================================
Files 422 422
Lines 76545 76693 +148
Branches 12509 12549 +40
=========================================
+ Hits 68621 68721 +100
- Misses 5121 5150 +29
- Partials 2803 2822 +19 |
d43a8a8
to
dec9e12
Compare
69283b0
to
7f29c02
Compare
7f29c02
to
67cbb5d
Compare
mne/channels/montage.py
Outdated
Parameters | ||
---------- | ||
fname : str | ||
The filepath of Digitization EEGLAB formatted file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filepath of Digitization EEGLAB formatted file. | |
The file containing electrode locations in EEGLAB format. |
If I didn't mess up, I think that what we are missing is: The other hpts file https://github.com/mne-tools/mne-python/blob/master/mne/io/edf/tests/data/biosemi.hpts is a biosemi64 but I don't have the format of the original file. I have not checked that the result matches the loc file we have is in I said supposedly because the ch_names are not a subset of the So my plan so far: 1 - allow polhemus to take the hpts file we have |
I would make And if we want, we can add an option to return the raw theta/phi values as an |
e233ac5
to
e3212fd
Compare
@larsoner the issue is not that it is stored weirdly. The problem is that it returns something closer to |
mne/channels/montage.py
Outdated
|
||
|
||
def read_standard_montage(fname, head_size=HEAD_SIZE_DEFAULT, unit='m'): | ||
"""Read a standard montage file containing polar coordinates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you check if all files you can read now are in polar coordinates?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right way to split them would had been well possed formats vs ill-posed formats. In other wourds, if we have xyz or r,theta,phi is well posed + ch_names and types. (and we should allow for head_size=None and recover whatever is in the file with 0 magic). And this should be some kind of reader (brainvision, hpts, ..)
and read_standard_montage
should be used for illposed ie not having radius.
But since we were ignoring it everywhere in read_montage. I just decided to stuff everything in read_standard_montage
and drive the action with head_size.
mne/channels/tests/test_montage.py
Outdated
montage = read_montage(op.join(tempdir, kind), transform=True) | ||
|
||
with pytest.deprecated_call(): | ||
# XXX: This is a regression test that might need to be translated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still to do or not?
7aab522
to
16ab7dc
Compare
I'll be AFK, feel free to push in the PR. |
We need to update also https://mne.tools/dev/auto_tutorials/misc/plot_sensor_locations.html?highlight=montage |
ff5e76c
to
49d7f5b
Compare
49d7f5b
to
d84aacf
Compare
* WIP: deprecate read_montage in test_montage * wip: just to see what crashes. * continue deprecation * WIP: Add read_dig_eeglab * FIX: read_dig_eeglab docstrings and doc * TST: update test * update whatsnew * add read_dig_eeglab to deprecation msg * Its not read_dig_eeglab. * WIP: Add read_dig_polhemus_fastscan * WIP: add read_standard_montage * WIP: circular dep * fix merge * wip * WIP: something is really funky * fix: old montage was not scaled for .loc * TST: I give up trying to understand why they don't get set same * fix? * remove read_dig_eeglab * fix brainvision * some more fixes * TST: make sure we can read everything * fix * FIX: make _pop_montage not depend in n_fid * WIP: add sfp * wip: add matlab * fix eeglab * wip: add asa electrode * wip: add generic theta-phi in degrees files * wip: add hpts * wip: BESA * wip: add brainvision * fix: besa * TST: add some meaningful information * TST: do test something * wip * ups * clarify what's new + fully deprecate read_dig_montage + factorize code * add read_dig_hpts fucntion * coord_frame param in DigMontage was never released * misc * pep8 + cleanup * more cleanup * update documentation * fix doc? * fix fialing test * BUG: Fix linking problems and rename function * DOC: Complete table * FIX: Dep
This PR needs better description 'cos it will have a dependency
This is a list of all the digitization files I could find in my pc
depends on #6765