Closed lrfreeman closed 1 month ago
Hi,
Unit match require that the channel_positions cover the full probe (as we use all of the channel in the calculations) however some spike sorters occasionally omit some inactive channel, we try to fix this my estimating the missing channel positions. I will look into the estimation to see if I can improve it, however if you could send me the channel_positions.npy and channel_map.npy files, and give me how many channels was recorded for this session it would be very helpful for spotting and fixing this issue.
best, Sam
Ok great - Maybe I can try and manually fill the channel positions that are missing then and see if that fixes the error? Some things to note:
We don't load the sync channel when using spike interface because that prevents channel map plotting in their library:
We also remove bad channels through spike interface although I'm not sure this would effect channel_postions and channel_map files:
In terms of the error I'm having now it's this:
Where:
And when I print ChannelPos I get nans:
Here are the files:
I appriciate your help on this!
With the data you sent I am not seeing any issues (both the channel_map and channel_positions seem full) Could you look to see if:
What the code is doing is to check that the channel_positions have the same number of channels as the extracted raw waveforms, if they don't the fill_missing_pos
function will run and attempt to fill in the missing positions. I think your raw waveforms have a missing channel (one less than the channel_positions.npy and channel_map.npy files) which will cause this issue.
To check whether the raw waveforms have been generated wrong I reran them with these parameters:
I previously had nChannels at 384 and moved it to 383. Not sure exactly why I have 383 I would expect 384 if spike interface only removes the sync channel. This helped with the missing channel errors. Now it runs clean.
However I get a new error when running the next block:
With the error being:
Okay, I have encountered a similar issue before and I will look into it. If you could send the RawWaveform folder and the good units .tsv , then I will be able to test the fix on applicable data.
I would recommend looking at the two problematic units (plt.plot(waveform[unit, :, :, 1])
to see how the units look, as they are likely bad units, a temp fix would be to maually label them as mua in your good units .tsv file.
(Note you have to use ClusInfo['OriginalID'][unit]
to go back to the proper unit ID, where unit is 56
and 214
)
Sure - here is one of the sessions the other seems to big to zip and send across but i can send via email?. I will try and manually remove these clusters and see what happens. Thanks 25th.zip
Hi, When running the data you sent I didn't have nay problems (even on the old version), however I have updated the code (PyPi and WIP branch) to refactor and fix some bugs. I believe this should fix you issue., if it doesn't I would recommend checking if those units are very bad (noise/artefact units can break the code).
please let me know if the issue remains.
Hey!
I'm getting an error with channel position:
Which is leading to a (I assume) errors down the line
Any advice?