Hello!
I have a problem trying to display the projectors (I’m working with OPM data in fif format).
I have tried everything, including just uploading a file, calculating the projectors and adding them and then I run:
** File ~\anaconda3\Lib\site-packages\mne_fiff\pick.py:293 in pick_channels**
** raise RuntimeError(“ch_names is not a unique list, picking is unsafe”)**
RuntimeError: ch_names is not a unique list, picking is unsafe
I have checked the structures and everything is ok, maybe (it seems to be) a problem with pick_channels.
Sure! but I am wondering what is the best way to share it, because the structure (specially of projectors) has too many branches to just paste it here. Because It is not possible to upload files, is it?
The 2 files will be very small and you can share them either directly on the forum through an external provider; or in a GitHub issue here: Issues · mne-tools/mne-python · GitHub
First I thought that the error was related to the (additional) input channel stored in info.raw, but by dropping it before the projectors computing I got the same error message.
Turns your list of unique channel names into a list of channel names with duplicate, which then yields the error you get: ch_names is not a unique list. In particular, the 2 channels L108_bz-s77 and L108_bz-s110 both end up as L108_bz.
I am not familiar with the naming schema of your channels, but since you mention working with OPM data, this is not a VectorView or CTF system and should be treated as a bug. I opened: Fix by mscheltienne · Pull Request #12489 · mne-tools/mne-python · GitHub to track and fix it.
In the meantime, you can try renaming your channels with raw.rename_channels.