MRG: Add support to retrieve channel type from ['chanlocs']['type'] with EEGLAB reader#9990
MRG: Add support to retrieve channel type from ['chanlocs']['type'] with EEGLAB reader#9990larsoner merged 11 commits intomne-tools:mainfrom mscheltienne:eeglab_reader_add_support_for_ch_types
Conversation
|
I think a test would be really useful here. Can you use an existing |
|
@cbrnr Oh right.. I'm dumb, I can just edit the |
|
@mscheltienne in case you're wondering why I edited the title, you don't have to include a period (super nitpicky I know). |
|
Ahah alright, I was looking at it and had no idea what changed! |
|
So.. it's actually a pain to test for now. The test I added is restricted to the modification to the private function By the way, I did test with the |
|
Ready for review/merge @mscheltienne ? |
larsoner
left a comment
There was a problem hiding this comment.
Other than a simplification idea, LGTM!
larsoner
left a comment
There was a problem hiding this comment.
... oh actually you need a latest.inc update. I think this should qualify as a bugfix, as 1) it fixes type handling and 2) people's code could actually break from this PR if they've been picking types as 'eeg' that will now be something else
Tested locally. Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
|
I don't know why the doc build seems to fail.. Any idea? |
|
It's pydata/pydata-sphinx-theme#508, I'll open a PR to fix it |
|
@larsoner Any particular reason why https://github.com/mne-tools/mne-python/blob/main/mne/__init__.py#L34 |
|
Same remark for |
|
And for |
|
This discussion sounds familiar 😄 |
|
Discussion in #9560 |
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
|
Alright, I didn't read it entirely last time I saw it; and I didn't remember it also mentioned the |
|
Thanks @mscheltienne ! |
…EGLAB reader (#9990) * Add support to retrieve channel type from ['chanlocs']['type']. * Add small test of _get_montage_info * fix flake. * Remove one line. * Update mne/io/eeglab/eeglab.py [ci skip] Tested locally. Co-authored-by: Eric Larson <larson.eric.d@gmail.com> * Add entry to changelog [skip azp] [skip actions] * Add warning and test. * Add more detailed warning. * fix flake8 * style commit to rerun doc build [skip azp] [skip actions] * Update doc/changes/latest.inc [skip azp] [skip actions] Co-authored-by: Eric Larson <larson.eric.d@gmail.com> Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Following #9989, a quick proposition to read channel types with EEGLAB reader.
In the reader, the data is read in a variable named
eegsince EEGLAB is mostly focused on EEG datasets. However, in practice it does support more data types; and I could rename left and right this variable to e.g.datato make the code a bit more general if you want.