Open myagmur01 opened 3 years ago
Hi @mytrjp ,
both questions relate to the spike waveforms which are extracted from the signal, i,e., the cutout of the signal around each spike.
The time_interval
specifies the cut-out interval around each spike. -2 and 4 is of course somewhat arbitrary, however, many spike sorting tools choose values in this range: the spike is about 1-2 ms in length, and then you take a bit before the spike peak, and a bit more after the spike peak (to catch the dynamics after the spike).
If you set the time_stamps
to None
, peaks are extracted using numpy's peak finder. Therefore, the spike times will always be the same. However, the waveforms stored in the spike train (in spikes.waveforms
, an NxM matrix for the N spikes, each row containing a waveform) should be different: In the first example, they should range from -10ms to 10ms, in the last example they should be from 5 to 15 ms. Thus, as an example, if the sampling frequency is 10KHz, and 123 spikes where detected, then spikes.waveforms should be size 123x200 for the first example.
I hope this helps. Thanks for asking this, I will keep this issue open as a reminder to augment the documentation to better explain this.
Hi @mdenker
I am using elephant.spike_train_generation.spike_extraction function for my MEA 96-channel signal. I have following questions:
Why default values are selected as [-2ms, 4ms]
What is exactly the
time_interval
here? When I set it to [-10 ms,10 ms] or [0 ms, 10 ms] or [5 ms,15 ms] I get the same results of spike times as below. Could you explain me if I am doing something wrong?Thank you