csn-le / wave_clus

A fast and unsupervised algorithm for spike detection and sorting using wavelets and super-paramagnetic clustering
121 stars 65 forks source link

Definition of spiking times #193

Closed ahmetofficial closed 3 years ago

ahmetofficial commented 3 years ago

High Fernando, thank you for the great toolbox.

I have a question about the timing criteria of the spikes.

image

I try to align the spike shapes which are provided by this tool on the raw data based on the spiking times in the cluster_class array. I am doing this because I am trying to get rid of all SUA and MUA to get background activity. But I am not able to align spikes properly.

In this example, I am basically trying to align the beginning and end of the 1st spike shape on my raw data.

So, I want to know that how you define the spiking time (max absolute value in spike shape, etc). I basically try different methods (locating spike shape based on aligning spiking time with the location of max absolute value, aligning with separating the spike shape into two half in time, etc ) but didn't able to a proper alignment.

Thank you in advance.

ferchaure commented 3 years ago

Hi Ahmet, The detection times are defined as the peak (negative or positive as I see ) of the signal between half refractory period after a threshold crossing. If you want to use the detected spikes to remove them from the signal, set both filters with the same parameters and disable interpolation.

Remember that the detection is disabled close to the borders of the signals because we have to be able to get the spike waveform of that detection.

ahmetofficial commented 3 years ago

Hi Fernando,

Thank you for the answer, it helped me a lot.