You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error with 'device_channel_indices' that do not match channel count in baserecordingsnippets.py #1937
I'm running into an issue when I create my own probe object using the probeinterface package with device_channel_indices that exceeds the number of recording channels. For my ephys experiments, a Ripple recording system was used to record 64 uECoG electrodes using two head stages, so the .ns5 (blackrock) recording file has channel ids going from 1-32 and 129-160.
When I manually create a probe object of my uECoG with probeinterface, I remap the physical electrodes to the actual Ripple recording channels and set the 'device_channel_indices' accordingly.
This triggers the following error in SpikeInterface when I try to set the probe I manually created to the recording object
When looking at the source code where this error gets flagged, I can see there's a TODO comment, so perhaps this is something you are currently looking at. I just wanted to bring it up here as well. Hopefully this is an easy fix?
My intuition tells me that line 146 of baserecordingsnippets.py could be replaced with the len() function instead of the np.max() function, but I'm not sure how that would affect the edge case of loading a probe with no channel list.
I'm able to work around this issue when I set the device_channel_indices using probeinterface with list(range(0,64)), so I'm able to run the rest of the pipeline. It'll be nice to have a one-to-one map of physical electrodes to recording channel number tho.
Hi @Serge-Vargo
you have to handle el_num_scheme as indices. In short a int number zero based in 0-63(included) range.
In your code el_num_scheme is the ID (transformed as an integer) which is wrong.
Activity
samuelgarcia commentedon Aug 28, 2023
Hi @Serge-Vargo
you have to handle
el_num_schemeas indices. In short a int number zero based in 0-63(included) range.In your code
el_num_schemeis the ID (transformed as an integer) which is wrong.Serge-Vargo commentedon Aug 30, 2023
Hi @samuelgarcia,
Thanks for looking into this. Understood. I can handle
el_num_schemeas indices, not a problem.