elephant.spike_train_correlation.spike_time_tiling_coefficient¶
-
elephant.spike_train_correlation.
spike_time_tiling_coefficient
(spiketrain_i, spiketrain_j, dt=array(0.005) * s)[source]¶ Calculates the Spike Time Tiling Coefficient (STTC) as described in [1] following their implementation in C. The STTC is a pairwise measure of correlation between spike trains. It has been proposed as a replacement for the correlation index as it presents several advantages (e.g. it’s not confounded by firing rate, appropriately distinguishes lack of correlation from anti-correlation, periods of silence don’t add to the correlation and it’s sensitive to firing patterns).
The STTC is calculated as follows:
Where PA is the proportion of spikes from train 1 that lie within [-dt, +dt] of any spike of train 2 divided by the total number of spikes in train 1, PB is the same proportion for the spikes in train 2; TA is the proportion of total recording time within [-dt, +dt] of any spike in train 1, TB is the same proportion for train 2. For the resulting is replaced with , since every spike from the train with is within [-dt, +dt] of a spike of the other train.
This is a Python implementation compatible with the elephant library of the original code by C. Cutts written in C and avaiable at: (https://github.com/CCutts/Detecting_pairwise_correlations_in_spike_trains/ blob/master/spike_time_tiling_coefficient.c)
Parameters: - spiketrain_i, spiketrain_j: neo.SpikeTrain
Spike trains to cross-correlate. They must have the same t_start and t_stop.
- dt: pq.Quantity.
The synchronicity window is used for both: the quantification of the proportion of total recording time that lies [-dt, +dt] of each spike in each train and the proportion of spikes in spiketrain_i that lies [-dt, +dt] of any spike in spiketrain_j. Default : 0.005 * pq.s
Returns: - index: float or np.nan
The spike time tiling coefficient (STTC). Returns np.nan if any spike train is empty.
Notes
Alias: sttc
References
[1] Cutts, C. S., & Eglen, S. J. (2014). Detecting Pairwise Correlations in Spike Trains: An Objective Comparison of Methods and Application to the Study of Retinal Waves. Journal of Neuroscience, 34(43), 14288–14303.