Skip to content
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 example showing all the eeg helmets #6158

Merged
merged 24 commits into from
Apr 23, 2019

Conversation

massich
Copy link
Contributor

@massich massich commented Apr 16, 2019

This PR mimics the first step of #6146 for all the montage files. And fix whatever is needed to have a convenient user code like:

for current_montage in get_builtin_montages():
    montage = mne.channels.read_montage(current_montage)
    info = mne.create_info(ch_names=montage.ch_names,
                           sfreq=1,
                           ch_types='eeg',
                           montage=montage)

    plot_alignment(info, trans=None, subject='fsaverage',
                   subjects_dir=subjects_dir,
                   eeg=['original', 'projected'])

What I've used to see if the results are more or less ok

  • EGI_256 ref
  • GSN-HydroCel ref datasheet
  • biosemi ref
  • easycap (for the 10 )
  • mgh
  • standard_1005
  • standard_1020 ref
  • standard_alphabetic
  • standard_postfixed
  • standard_prefixed
  • standard_primed

@agramfort
Copy link
Member

here is the rendered doc: https://12266-1301584-gh.circle-artifacts.com/0/dev/auto_examples/visualization/plot_montage.html

to should see montage file by montage file what option is needed to make it correct.
I expect some adhoc options that we should make superfluous with a future release
so it jsut works out of the box for any of these files

@massich can you report which should be fixed to move forward here?

@codecov
Copy link

codecov bot commented Apr 16, 2019

Codecov Report

Merging #6158 into master will increase coverage by 1.77%.
The diff coverage is 50%.

@@            Coverage Diff             @@
##           master    #6158      +/-   ##
==========================================
+ Coverage   87.21%   88.98%   +1.77%     
==========================================
  Files         412      412              
  Lines       73985    74004      +19     
  Branches    12270    12273       +3     
==========================================
+ Hits        64525    65853    +1328     
+ Misses       6588     5249    -1339     
- Partials     2872     2902      +30

@massich
Copy link
Contributor Author

massich commented Apr 18, 2019

the easycap_m10 seems a bit off in pitch, based on this

And so does M1

@agramfort agramfort changed the title Add example showing all the eeg helmets [WIP] Add example showing all the eeg helmets Apr 20, 2019
Copy link
Member

@agramfort agramfort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do we do with this PR? I am now lost.

Unit of the input file. If not 'm' (default), coordinates will be
rescaled to 'm'.
unit : 'm' | 'cm' | 'mm' | 'auto'
Unit of the input file. Defaults to 'auto'.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'auto' is not documented

Plotting sensor layouts of EEG Systems
======================================

Show sensor layouts of different EEG systems.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too short. please explain more what you did.

@massich
Copy link
Contributor Author

massich commented Apr 20, 2019 via email

@agramfort
Copy link
Member

yes I understand the purpose but it contains the fsaverage fetcher so I cannot merge this.

@massich massich self-assigned this Apr 23, 2019
massich and others added 15 commits April 23, 2019 15:01
* FIX: Fix inconsistencies with compute_proj_raw

* BUG: SciPy req
* Added import _freq_mask

Enable import the function _freq_mask from .numerics

* Added _freq_mask function

Added _freq_mask function equivalent to _time_mask function, but for frequency

* Added tests for _freq_mask

Added tests for _freq_mask

* Added frequency cropping args to BaseTFR class

Enables frequency cropping with tfr.crop(fmin, fmax) for TFR objects

* Enhanced test_crop

Enhanced test_crop to also test for frequency cropping.

* updated documentation for BaseTFR.crop function,
fixed floating point issues in utils.numerics._freq_mask

* Updated docstring for BaseTFR.crop

Updated docstring for BaseTFR.crop to show fmin/fmax params

* Fixed _freq_mask

fixed floating point error in _freq_mask

* Adapted test_freq_mask to function changes

Adapted test_freq_mask to error fix in freq_mask

* Adapted docstring BaseTFR.crop

Adapted docstring for version in BaseTFR.crop

* Removed Debugging notes

Removed Debugging notes from test_crop

* correct spacing

correct spacing

* Fixed code format
Fixed some code for flake8

* Updated whats_new.rst
Added changes to whats_new.rst

* Updated whats_new.rst
Fixed update to whats_new.rst

* Eliminated Conflicts with master
eliminated merge conflicts in mne.utils.__init__.py

Also edited test_freq_mask and test_time_mask mne.utils.tests.test_numerics to find errors more explicitely.

* fixed flake8 probs

* changed _time/_freq_mask code style
changed code format and error message.

* Removed sfreq=None from _freq_mask
-Removed sfreq=None argument default from mne/utils/numerics.py::_freq_mask
-Adapted relevant tests and methods accordingly

* Removed support for sfreq=None from _freq_mask
-Introduced raise(ValueError) When sfreq=None
-Introduced tests for sfreq=None case

* Made _BaseTFR.crop omit mask if not defined.
- _time_mask or _freq_mask are only called, if they were defined in crop()
- _time_mask, _freq_mask were changed back to save time & mem

* corrected new merge conflicts once again

corrected merge conflicts with mne/utils/__init__.py

* corrected conditions in _BaseTFR.crop

corrected ```_time_mask``` and ```_freq_mask``` conditions in ```_BaseTFR.crop()```

* Make TFR raise value error for freqs <= 0

Make multitaper and morlet raise a value error if freqs include a frequency <= 0.

Signed-off-by: Dirk Gütlin <[email protected]>

* convert freqs in morlet and _make_dpss to np.array

convert freqs in morlet and _make_dpss to np.array for faster computation

Signed-off-by: Dirk Gütlin <[email protected]>

* changed error statements

changed error statements for invalid frequencies passed in mne/time_frequency/tfr.py ::morlet and ::_make_dpss

Signed-off-by: Dirk Gütlin <[email protected]>
…ne-tools#6173)

* better title in plot_compare_evokeds (closes mne-tools#6165)

* use logger.info instead of warn

* fix stupidity

* simplify
…mestamps (mne-tools#6184)

* DOC: make sure you get a warning when reading onsets which are not timestamps in .csv

* non-empty match
* Add an example using the LSLClient

n_chan --> n_channels

* Refactor FTClient; Add MockLSLStream, refactor test to use mock stream

* update reference and whats new

* fixing some errors

* update style

* temp

* improvements to the realtime module

currently the test is breaking when it comes to using the RtEpochs object.

* minor fix

* move the RtEpochs testing to separate PR

* cleanup

* fix the way super is called

* updated the MockLSLStream to take raw instance

* add time dilation factor, cleanup

* add more info on lsl identifier

* address ci

* skip running test with multiprocessing on windows

Windows runs into a problem with multiprocessing: 'https://stackoverflow.com/questions/50079165/'

* cleaned up the windows check

* update the pylsl requirement to 1.12

this is compatible across platforms
* Keep eric's fsaverage

* make set_montage_coreg_path as private

* stip check manifest out from fsaverage

* ENH: better parameter name

* move the fsaverage info to fsaverage

* FIX: docstring

* [skip ci] move fsaverage files

* rename

* update the fsaverage manifests

* FIX: use the new zip files

* FIX: Fix test

* FIX: manifests

* FIX: Manifest again

* FIX: Doc

* FIX: call montage setter

* ENH: Simplify

* FIX: string

* fix

* Skip the test for 3.5, since zipfiles cannot be written
@massich massich changed the title [WIP] Add example showing all the eeg helmets Add example showing all the eeg helmets Apr 23, 2019
@larsoner
Copy link
Member

Thanks @massich

@larsoner larsoner merged commit 0b637d8 into mne-tools:master Apr 23, 2019
jeythekey pushed a commit to jeythekey/mne-python that referenced this pull request Apr 27, 2019
@massich massich deleted the plot_eeg_helmets branch May 27, 2019 12:09
@massich massich mentioned this pull request Jun 17, 2019
19 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants