import mne
p01_raw = data_path + p01
raw = mne.io.read_raw_bdf(p01_raw)
print (raw)
print (raw.info)
The block above you asked me to run yields the following:
Extracting EDF parameters from C:\Users\Raahul Pathak\Research\Raahul\Thesis-Project\Participant-Information\p1.bdf...
BDF file detected
Setting channel info structure...
Creating raw.info structure...
<RawEDF | p1.bdf, 73 x 595712 (2327.0 s), ~73 kB, data not loaded>
<Info | 7 non-empty values
bads: []
ch_names: Fp1, AF7, AF3, F1, F3, F5, F7, FT7, FC5, FC3, FC1, C1, C3, C5, ...
chs: 72 EEG, 1 Stimulus
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 52.0 Hz
meas_date: 2023-03-03 11:50:57 UTC
nchan: 73
projs: []
sfreq: 256.0 Hz
And the for loop you asked me to run still gives the ValueError. Here is the full traceback.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-1b9a2d01e3f2> in <module>
----> 1 for _ in raw:
2 pass
c:\users\raahul pathak\appdata\local\programs\python\python39\lib\site-packages\mne\io\base.py in __getitem__(self, item)
840
841 """ # noqa: E501
--> 842 return self._getitem(item)
843
844 def _getitem(self, item, return_times=True):
c:\users\raahul pathak\appdata\local\programs\python\python39\lib\site-packages\mne\io\base.py in _getitem(self, item, return_times)
843
844 def _getitem(self, item, return_times=True):
--> 845 sel, start, stop = self._parse_get_set_params(item)
846 if self.preload:
847 data = self._data[sel, start:stop]
c:\users\raahul pathak\appdata\local\programs\python\python39\lib\site-packages\mne\io\base.py in _parse_get_set_params(self, item)
776 )
777
--> 778 sel = _picks_to_idx(self.info, item[0])
779
780 if isinstance(item[1], slice):
c:\users\raahul pathak\appdata\local\programs\python\python39\lib\site-packages\mne\io\pick.py in _picks_to_idx(info, picks, none, exclude, allow_empty, with_ref_meg, return_kind, picks_on)
1302 raise ValueError("All picks must be >= %d, got %r" % (-n_chan, orig_picks))
1303 if (picks >= n_chan).any():
-> 1304 raise ValueError(
1305 "All picks must be < n_%s (%d), got %r" % (picks_on, n_chan, orig_picks)
1306 )
ValueError: All picks must be < n_channels (73), got 73