question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'No data channels found' with plot_psd() on misc channels

See original GitHub issue

Issue: 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:closed
  • Created 3 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, Apr 19, 2020

@drammock do you want to work on the fix? If not, I can tackle it this week

1reaction
drammockcommented, Apr 19, 2020
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found