This repository contains some of the code used in the manuscript "Theoretical relationship between two measures of spike synchrony: Correlation index and vector strength" (submitted Aug 2021).
- simulate von Mises spike trains,
- calculate vector strength (VS), correlation index (CI) and shuffled autocorrelogram (SAC) from spike trains,
- calculate or estimate theoretical VS and CI via kappa,
- generate similar plots as in Figure 2 and Figure 3A of Kessler et al.
calcPhaseHist.mfunction to calculate the phase histogram and vector strength (VS) of spike trains.calcSAC.mfunction to calculate the shuffled autocorrelogram (SAC) and correlation index (CI) for spike trains.compCIbin.mfunction to compute the theoretical SAC decay with binning (cf. Equation 7 in Kessler et al.).estimateCI.mfunction to estimate CI from VS with their theoretical relation.estimateVS.mfunction to estimate VS from CI with their theoretical relation.genPhaseLock.mfunction to generate Poissonian spike trains with a von Mises spiking distribution.generateVM.mscript to generate Poissonian spike trains with a von Mises distribution; compute VS and CI; plot rasters, phase histograms and SACs; and compare empirical VS and CI values to their theoretical relation.testSACdecay.mscript to reproduce Figure 6 of Kessler et al. about the effect of the data length on the SAC.