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
As originally pointed out in this issue, running HerdingSpikes through SpikeInterface then accessing the resulting HSDetection object results in incorrect plots using PlotTracesChannels.
Turns out the localization is fine (assuming the correct electrode width and pitch were passed during probe initialization), it's the trace itself that is wrong.
where pos[event.ch][1] is the y-axis coordinate of the spike, and event.Shape is the waveform as, I'm assuming, a list of deviation from the spike's Amplitude. This is unlike the rest of the waveform plots :
This works fine when running only through HerdingSpikes, where the Shape list on my own data typically looks something like : [ 3 -2 -2 2 15 -9 -13 8 -5 11 2 12 3 2 1 -5].
However, through SpikeInterface, it's closer to this : [2094 2088 2022 2010 2032 2028 2041 2030 2032 2022 2031 2031 2032 2028 2027 2022 2027 2026 2043 2024], which shifts the waveform up.
From my very empirical attempt at matching the waveform with the raw trace it seems there's a shift of about +2300 µV in Shape values. I tried digging into the code to find where that list is being populated but I'm not familiar with C.
My first assumption would be that the problem comes from using RecordingExtractor instead of BioCam for the probe, but as pointed out before the raw data seems just fine. Do you have any idea what could be the cause ?
On a related note, I'm also not sure what the probe parameters of inner_radius and neighbor_radius refer to, and why they are so different based on the type of probe object. Is it because SpikeInterface uses microns for coordinates instead of "pixels" for BioCam ?
The text was updated successfully, but these errors were encountered:
As originally pointed out in this issue, running HerdingSpikes through SpikeInterface then accessing the resulting
HSDetection
object results in incorrect plots usingPlotTracesChannels
.Turns out the localization is fine (assuming the correct electrode width and pitch were passed during probe initialization), it's the trace itself that is wrong.
In
hs2.py
on line 316 :where
pos[event.ch][1]
is the y-axis coordinate of the spike, andevent.Shape
is the waveform as, I'm assuming, a list of deviation from the spike'sAmplitude
. This is unlike the rest of the waveform plots :where the actual raw data is plotted.
This works fine when running only through HerdingSpikes, where the
Shape
list on my own data typically looks something like :[ 3 -2 -2 2 15 -9 -13 8 -5 11 2 12 3 2 1 -5]
.However, through SpikeInterface, it's closer to this :
[2094 2088 2022 2010 2032 2028 2041 2030 2032 2022 2031 2031 2032 2028 2027 2022 2027 2026 2043 2024]
, which shifts the waveform up.From my very empirical attempt at matching the waveform with the raw trace it seems there's a shift of about +2300 µV in
Shape
values. I tried digging into the code to find where that list is being populated but I'm not familiar with C.My first assumption would be that the problem comes from using
RecordingExtractor
instead ofBioCam
for the probe, but as pointed out before the raw data seems just fine. Do you have any idea what could be the cause ?On a related note, I'm also not sure what the probe parameters of
inner_radius
andneighbor_radius
refer to, and why they are so different based on the type of probe object. Is it because SpikeInterface uses microns for coordinates instead of "pixels" for BioCam ?The text was updated successfully, but these errors were encountered: