Issue with pick_types(emg=True)
See original GitHub issueDescribe the bug
We get an error of “No Data channels found” when selecting emg channels with picks=['emg'] in a dataset which contains only emg channels.
Steps to reproduce
together with @jasmainak and @simonatemereanca we wrote this script: https://gist.github.com/TariqCannonier/0c708ae01268bfbb766bd320eac45035 to reproduce the bug.
Expected results
Should plot PSD for EMG channels only
Actual results
File "<ipython-input-7-ad302adea22f>", line 1, in <module>
runfile('/Users/tariqcannonier/.spyder-py3/temp.py', wdir='/Users/tariqcannonier/.spyder-py3')
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/tariqcannonier/.spyder-py3/temp.py", line 20, in <module>
raw.plot_psd(picks=['emg'])
File "</Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-147>", line 2, in plot_psd
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/utils/_logging.py", line 90, in wrapper
return function(*args, **kwargs)
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/io/base.py", line 1585, in plot_psd
spatial_colors=spatial_colors, verbose=verbose)
File "</Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/externals/decorator.py:decorator-gen-133>", line 2, in plot_raw_psd
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/utils/_logging.py", line 90, in wrapper
return function(*args, **kwargs)
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/viz/raw.py", line 621, in plot_raw_psd
raw.info, proj, picks, ax, area_mode)
File "/Users/tariqcannonier/anaconda3/lib/python3.7/site-packages/mne/viz/utils.py", line 3005, in _set_psd_plot_params
raise RuntimeError('No data channels found')
RuntimeError: No data channels found
Additional information
My system information is here:
Platform: Darwin-15.6.0-x86_64-i386-64bit
Python: 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)]
Executable: /Users/tariqcannonier/anaconda3/bin/python
CPU: i386: 4 cores
Memory: 8.0 GB
mne: 0.20.dev0
numpy: 1.17.2 {blas=mkl_rt, lapack=mkl_rt}
scipy: 1.3.1
matplotlib: 3.1.1 {backend=MacOSX}
sklearn: 0.21.3
numba: 0.45.1
nibabel: 2.5.1
cupy: Not found
pandas: 0.25.2
dipy: 1.0.0
mayavi: 4.7.1 {qt_api=pyqt5, PyQt5=5.10.1}
pyvista: 0.22.4
vtk: 8.1.2
None
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
type error when PickType used inside other helpers · Issue #868
I'm submitting a... [ ] Regression [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request...
Read more >Mapped Types - OpenAPI - A progressive Node.js framework
The PickType() function constructs a new type (class) by picking a set of properties from an input type. For example, suppose we start...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The problem is that it’s not just M/EEG, but also (at least) sEEG, ECoG, and fNIRS. So I’d rather say in the docs (maybe glossary?) what “data channels” are, that way if we add a new “data channel” we have fewer places that need updating.
@drammock fixed this in #7668