[quote="rajesh9121, post:3, topic:5216"]
montage = raw.get_montage()
print(montage.dig)
[/quote]
#CHOOSE WHICH RAW FILE TO RUN IN NEXT TWO LINES BELOW!!!
#raw = mne.io.read_raw_edf(raw_data_file, preload=True)
# THE EMOTIV FLEX EDF FILE IS CALLED: raw_qtest_file
raw = mne.io.read_raw_brainvision('numinous_test_data/ses-1/eeg/sub-19681349_ses-1_task-restEC_eeg.vhdr',preload=True)
#raw = mne.io.read_raw_edf('numinous_test_data/ses-1/eeg/sub-19681349_ses-1_task-restEC_eeg.vhdr', preload=True)
#raw = mne.io.read_raw_edf(raw_5meo2, preload=True)
print(raw.info)
print(raw.info['dig'])
ch_names = raw.info['ch_names']
ch_types = ['eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg',
'eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg','eeg']
info = mne.create_info(ch_names=ch_names, sfreq=256, ch_types=ch_types)
raw.info = info
print(raw.info)
montage_kind = "standard_1020"
montage = mne.channels.make_standard_montage(montage_kind)
raw.set_montage(montage, match_case=False,on_missing='ignore')
#THIS confirms that we have now added the digitization points
print(raw.info['dig'])
#The plots below rely on digitzation points being added:
#raw.plot_projs_topomap()
raw.plot_psd_topo()
raw.plot_sensors()
montage.plot()
#print(raw.info["sfreq"])
#raw.plot_projs_topomap() #### OF COURSE THIS LEADS TO A ZERO DIVISION ERROR SINCE THERE ARE NO PROJECTIONS IN ANY OF OUR FILES AS INDICATED IN: print(raw.info)
#ICA.plot_components(raw)
<Info | 7 non-empty values
bads: []
ch_names: Fp1, Fp2, F7, F3, Fz, F4, F8, FC3, FCz, FC4, T7, C3, Cz, C4, T8, ...
chs: 33 EEG
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 250.0 Hz
meas_date: unspecified
nchan: 33
projs: []
sfreq: 500.0 Hz
>
None
<Info | 7 non-empty values
bads: []
ch_names: Fp1, Fp2, F7, F3, Fz, F4, F8, FC3, FCz, FC4, T7, C3, Cz, C4, T8, ...
chs: 33 EEG
custom_ref_applied: False
highpass: 0.0 Hz
lowpass: 128.0 Hz
meas_date: unspecified
nchan: 33
projs: []
sfreq: 256.0 Hz
>
[<DigPoint | LPA : (-82.5, 0.0, 0.0) mm : head frame>, <DigPoint | Nasion : (-0.0, 114.0, 0.0) mm : head frame>, <DigPoint | RPA : (82.5, -0.0, -0.0) mm : head frame>, <DigPoint | EEG #1 : (-30.9, 114.6, 27.9) mm : head frame>, <DigPoint | EEG #3 : (28.4, 115.3, 27.7) mm : head frame>, <DigPoint | EEG #16 : (-71.9, 73.1, 25.8) mm : head frame>, <DigPoint | EEG #18 : (-51.8, 86.7, 78.7) mm : head frame>, <DigPoint | EEG #20 : (-1.2, 93.3, 102.6) mm : head frame>, <DigPoint | EEG #22 : (50.3, 87.4, 77.3) mm : head frame>, <DigPoint | EEG #24 : (71.4, 74.5, 25.1) mm : head frame>, <DigPoint | EEG #29 : (-61.9, 57.1, 93.8) mm : head frame>, <DigPoint | EEG #31 : (-1.3, 63.5, 126.6) mm : head frame>, <DigPoint | EEG #33 : (60.6, 57.7, 93.8) mm : head frame>, <DigPoint | EEG #38 : (-86.0, 14.9, 31.2) mm : head frame>, <DigPoint | EEG #40 : (-67.1, 23.4, 104.5) mm : head frame>, <DigPoint | EEG #42 : (-1.4, 27.6, 140.2) mm : head frame>, <DigPoint | EEG #44 : (65.3, 23.6, 103.7) mm : head frame>, <DigPoint | EEG #46 : (83.3, 15.3, 31.0) mm : head frame>, <DigPoint | EEG #51 : (-65.5, -11.9, 107.8) mm : head frame>, <DigPoint | EEG #53 : (-1.5, -10.5, 141.5) mm : head frame>, <DigPoint | EEG #55 : (64.7, -12.0, 107.7) mm : head frame>, <DigPoint | EEG #60 : (-74.5, -42.1, 41.3) mm : head frame>, <DigPoint | EEG #62 : (-55.0, -44.2, 99.9) mm : head frame>, <DigPoint | EEG #64 : (-1.7, -45.2, 126.7) mm : head frame>, <DigPoint | EEG #66 : (53.6, -44.3, 100.5) mm : head frame>, <DigPoint | EEG #68 : (71.0, -42.3, 41.2) mm : head frame>, <DigPoint | EEG #81 : (-31.6, -80.6, 54.8) mm : head frame>, <DigPoint | EEG #82 : (-2.1, -82.8, 60.7) mm : head frame>, <DigPoint | EEG #83 : (27.7, -80.5, 54.7) mm : head frame>]
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_5452\2638937880.py in <cell line: 29>()
27 #The plots below rely on digitzation points being added:
28 #raw.plot_projs_topomap()
---> 29 raw.plot_psd_topo()
30 raw.plot_sensors()
31 montage.plot()
~\anaconda3\envs\mne\lib\site-packages\mne\io\base.py in plot_psd_topo(self, tmin, tmax, fmin, fmax, proj, n_fft, n_overlap, layout, color, fig_facecolor, axis_facecolor, dB, show, block, n_jobs, axes, verbose)
1589 show=True, block=False, n_jobs=1, axes=None,
1590 verbose=None):
-> 1591 return plot_raw_psd_topo(self, tmin=tmin, tmax=tmax, fmin=fmin,
1592 fmax=fmax, proj=proj, n_fft=n_fft,
1593 n_overlap=n_overlap, layout=layout,
<decorator-gen-184> in plot_raw_psd_topo(raw, tmin, tmax, fmin, fmax, proj, n_fft, n_overlap, layout, color, fig_facecolor, axis_facecolor, dB, show, block, n_jobs, axes, verbose)
~\anaconda3\envs\mne\lib\site-packages\mne\viz\raw.py in plot_raw_psd_topo(raw, tmin, tmax, fmin, fmax, proj, n_fft, n_overlap, layout, color, fig_facecolor, axis_facecolor, dB, show, block, n_jobs, axes, verbose)
500 if layout is None:
501 from ..channels.layout import find_layout
--> 502 layout = find_layout(raw.info)
503
504 psds, freqs = psd_welch(raw, tmin=tmin, tmax=tmax, fmin=fmin,
~\anaconda3\envs\mne\lib\site-packages\mne\channels\layout.py in find_layout(info, ch_type, exclude)
424 raise RuntimeError('Cannot make EEG layout, no measurement info '
425 'was passed to `find_layout`')
--> 426 return make_eeg_layout(info, exclude=exclude)
427 elif has_csd_coils and ch_type in [None, 'csd']:
428 return make_eeg_layout(info, exclude=exclude, csd=True)
~\anaconda3\envs\mne\lib\site-packages\mne\channels\layout.py in make_eeg_layout(info, radius, width, height, exclude, csd)
260 pick_kwargs.update(csd=True, eeg=False)
261 picks = pick_types(info, **pick_kwargs)
--> 262 loc2d = _find_topomap_coords(info, picks)
263 names = [info['chs'][i]['ch_name'] for i in picks]
264
~\anaconda3\envs\mne\lib\site-packages\mne\channels\layout.py in _find_topomap_coords(info, picks, layout, ignore_overlap, to_sphere, sphere)
623 pos = np.asarray(pos)
624 else:
--> 625 pos = _auto_topomap_coords(
626 info, picks, ignore_overlap=ignore_overlap, to_sphere=to_sphere,
627 sphere=sphere)
~\anaconda3\envs\mne\lib\site-packages\mne\channels\layout.py in _auto_topomap_coords(info, picks, ignore_overlap, to_sphere, sphere)
722 ]
723
--> 724 raise ValueError('The following electrodes have overlapping positions,'
725 ' which causes problems during visualization:\n' +
726 ', '.join(problematic_electrodes))
ValueError: The following electrodes have overlapping positions, which causes problems during visualization:
VPVA, VNVB, HPHL, HNHR, Erbs, OrbOcc, Mass