'No data channels found' with plot_psd() on misc channels
See original GitHub issueIssue: Error of “No Data channels found” when attempting to plot_psd() on misc channels in a dataset which contains only misc channels. The dataset is created from raw numpy EEG data derived from a custom made device.
Platform
Platform: Darwin-19.3.0-x86_64-i386-64bit
Python: 3.7.7 (default, Mar 10 2020, 15:43:33) [Clang 11.0.0 (clang-1100.0.33.17)]
mne: 0.21.dev0
numpy: 1.18.2 {blas=openblas, lapack=openblas}
scipy: 1.4.1
matplotlib: 3.2.1 {backend=MacOSX}
Steps: Create mne object from raw data
mne_data = create_mne_object(channels, data, samp_freq)
print(mne_data)
print(mne_data.info)
The output is shown below.
<RawArray | 2 x 1024 (4.1 s), ~25 kB, data loaded>
<Info | 7 non-empty values
bads: []
ch_names: CH1, CH2
chs: 2 MISC
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 125.0 Hz
meas_date: unspecified
nchan: 2
projs: []
sfreq: 250.0 Hz
>
Time-domain data does plot correctly. However, when attempting to plot psd:
picks = mne.pick_types(mne_data.info, misc=True)
print(picks)
spect = mne_data.plot_psd(picks=picks)
Output:
[0 1]
RuntimeError: No data channels found
Summary This issue seems similar to the bug here. Is there a workaround at this point? I have tried passing picks=None without success.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
plot_psd crashes when ch_types is not indicated in info #8270
Channel types are important in MNE, and you should set them to the correct types. In this case, the error message about "no...
Read more >mne.io.Raw — MNE 1.2.2 documentation - MNE-Python
Adds reference channels to data that were not included during recording. This is useful when you need to re-reference your data to different ......
Read more >Error trying filter and plot data using EMG data - MNE Forum
EMG is no data channel. I think what should work is passing picks='emg' to filter() in order to enforce operation on the emg...
Read more >philistine Documentation
The stimulus channel is not exported as channel data, but, in line with BrainVision convention, the events array can be exported to the...
Read more >Makoto's useful EEGLAB code - SCCN
The following examples show how to deal with EEGLAB data ... loc_subsets() - Separate channels into maximally evenly-spaced subsets.
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 FreeTop 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
Top GitHub Comments
@drammock do you want to work on the fix? If not, I can tackle it this week
@gpeyton you can change the channel type with: https://mne.tools/dev/generated/mne.io.Raw.html#mne.io.Raw.set_channel_types