I am trying to get MNE to read my montage from a compumedics neuroscan EEG system, but it cannot seem to identify the channel locations from my file. I have Windows 11 and am using Curry 9 to record EEG data. My āchanlocsā file is a .csv with ālabelā for channels, x,y,z coordinates and other measures.
Here is my code:
fname = āchanlocsā
path_chan = rāC:\Users.ā¦\chanlocs.csvā
montage = mne.channels.read_custom_montage(path_chan)
And the error:
ValueError Traceback (most recent call last)
Input In [58], in <cell line: 4>()
1 fname = āchanlocsā
2 path_chan = rāC:\Users\Louise\Desktop\eeg data\n-back\chanlocs.csvā
----> 4 montage = mne.channels.read_custom_montage(path_chan)
File ~\Anaconda3\envs\mne\lib\site-packages\mne\channels\montage.py:1399, in read_custom_montage(fname, head_size, coord_frame)
1396 montage = _read_brainvision(fname, head_size)
1398 elif ext in SUPPORTED_FILE_EXT[āxyzā]:
ā 1399 montage = _read_xyz(fname)
1401 if coord_frame is not None:
1402 coord_frame = _coord_frame_const(coord_frame)
File ~\Anaconda3\envs\mne\lib\site-packages\mne\channels_standard_montage_utils.py:392, in _read_xyz(fname)
390 ch_names.append(ch_name)
391 pos.append((x, y, z))
ā 392 d = _check_dupes_odict(ch_names, np.array(pos, dtype=float))
393 return make_dig_montage(ch_pos=d)
ValueError: could not convert string to float: āā
Here is a snapshot of what the csv file looks like:
Could you please share the original CSV file here? Open it in a text editor (not in a spreadsheet program), paste the contents here, select what youāve pasted, and click on the Preformatted text button in the toolbar. Thanks!
Thank you for your response! I actually resolved the issue since the code was correct, but I had an outdated file from Compumedics - attached is the updated QuickCap64 montage for future reference.