- mne==0.20.8
- operating system: Linux Mint (using Jupyter notebook)
I need a help about an error just i run epoch.filter(l_freq=20., h_freq=450.)
Error: ValueError: picks (NoneNone, treated as "data_or_ica") yielded no channels, consider passing picks explicitly
That error happen when I use epoch.plot_psd
too…
I am working with sEMG data… Anyone known what is it?
A complete error is follow:
obj_filtered = epoch.filter(l_freq=20., h_freq=450.)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-29-b3662d60ef07> in <module>
----> 1 obj_filtered = epoch.filter(l_freq=20., h_freq=450.)
<decorator-gen-111> in filter(self, l_freq, h_freq, picks, filter_length, l_trans_bandwidth, h_trans_bandwidth, n_jobs, method, iir_params, phase, fir_window, fir_design, skip_by_annotation, pad, verbose)
~/repo/lib/python3.8/site-packages/mne/filter.py in filter(self, l_freq, h_freq, picks, filter_length, l_trans_bandwidth, h_trans_bandwidth, n_jobs, method, iir_params, phase, fir_window, fir_design, skip_by_annotation, pad, verbose)
1923 if pad is None and method != 'iir':
1924 pad = 'edge'
-> 1925 update_info, picks = _filt_check_picks(self.info, picks,
1926 l_freq, h_freq)
1927 if isinstance(self, BaseRaw):
~/repo/lib/python3.8/site-packages/mne/filter.py in _filt_check_picks(info, picks, h_freq, l_freq)
2232 update_info = False
2233 # This will pick *all* data channels
-> 2234 picks = _picks_to_idx(info, picks, 'data_or_ica', exclude=())
2235 if h_freq is not None or l_freq is not None:
2236 data_picks = _picks_to_idx(info, None, 'data_or_ica', exclude=(),
~/repo/lib/python3.8/site-packages/mne/io/pick.py in _picks_to_idx(info, picks, none, exclude, allow_empty, with_ref_meg, return_kind)
982 raise ValueError('picks must be 1D, got %sD' % (picks.ndim,))
983 if picks.dtype.char in ('S', 'U'):
--> 984 picks = _picks_str_to_idx(info, picks, exclude, with_ref_meg,
985 return_kind, extra_repr, allow_empty,
986 orig_picks)
~/repo/lib/python3.8/site-packages/mne/io/pick.py in _picks_str_to_idx(info, picks, exclude, with_ref_meg, return_kind, extra_repr, allow_empty, orig_picks)
1038 if len(picks_generic) == 0 and orig_picks is None and \
1039 not allow_empty:
-> 1040 raise ValueError('picks (%s) yielded no channels, consider '
1041 'passing picks explicitly'
1042 % (repr(orig_picks) + extra_repr,))
ValueError: picks (NoneNone, treated as "data_or_ica") yielded no channels, consider passing picks explicitly