Source Code - Event Synchronization
For a detailed description of the method please refer to:
Quian Quiroga R, Kreuz T, and Grassberger P:
Event Synchronization: A simple and fast method to measure synchronicity and time delay patterns.
Phys.Rev. E, 66, 041904 (2002) [PDF].
Matlab code to calculate the event synchronization and the event delay between two given spike trains:
[Event-Synchronization] Copyright: Thomas Kreuz
Function Event_sync.m:
Input:
Two spike trains (times of spikes)
Output:
Value of event synchronization and event delay
Example call:
x=[1:100]; % first spike train (completely periodic)
y=x+(rand(1,length(x))-0.5); % second spike train (first spike train with some random jitter)
[es,ed]=Event_sync(x,y); % es and ed give you the event synchronization and the event delay between spike train x and spike train y
Example output (timemode=1):

Example output (timemode=2):

Example output (timemode=3):

This is the version with the most simplest call (just two variables). Other
parameters are set at the beginning of the program:
plotmode (0-no,1-yes) - whether
or not you want to have a figure
numfig - number of that figure
printmode(0-no,1-yes) - whether
or not you want to save the figure as a postscript-file
filename - name of that file
xy_name - Names of the two spike trains
xy_col - colors to display the two spike trains
precision - negative logarithm of sampling interval (i.e., 3 for dt = 0.001)
taumode - maximum allowed time lag (to consider to events still to be synchronous): 1-fixed, 2-adaptive
timemode - kind of presentation: 1-cumulative, 2-windowed, 3: cumulative normalized (see Examples above)
tau - maximum allowed time lag (for taumode=1)
window - window size (for timemode=2)
Please feel free to adapt the program according to your needs (e.g., by using more variables in the call,...).
For a detailed description of the method please refer to:
Quian Quiroga R, Kreuz T, and Grassberger P:
Event Synchronization: A simple and fast method to measure synchronicity and time delay patterns.
Phys.Rev. E, 66, 041904 (2002) [PDF].
See also:
Measuring spike train synchrony I: SPIKE- and ISI-Distances and their extensions
Matlab-Codes to measure the ISI- and SPIKE-distances (and their extensions) between two (or more) given spike trains
For a detailed description of the methods please refer to:
Kreuz T,
Chicharro D, Greschner M, Andrzejak RG:
Time-resolved and time-scale adaptive measures of spike train synchrony.
J Neurosci Methods 195, 92 (2011) [PDF].
Kreuz T, Chicharro D, Andrzejak RG, Haas JS, Abarbanel HDI:
Measuring multiple spike train synchrony.
J Neurosci Methods 183, 287 (2009) [PDF].
Kreuz T, Haas JS, Morelli A, Abarbanel HDI, Politi A:
Measuring spike train synchrony.
J Neurosci Methods 165, 151 (2007) [PDF].
Measuring spike train synchrony III: Directionality
Matlab code to calculate the directionality measure L between two given spike trains (or between two continuous datasets or between a spike train and a continuous dataset)
For a detailed description of the method please refer to:
Andrzejak RG, Kreuz T:
Characterizing unidirectional couplings between point processes
and flows.
European Physics Letters 96, 50012 (2011)
[PDF].
Measuring spike train synchrony IV: van Rossum distance and multi-neuron extension
Matlab codes to calculate the spike train metric by van Rossum and the multi-neuron extension by Houghton and Sen.
For a detailed description of the method please refer to:
Houghton C, Kreuz T:
On the efficient calculation of van Rossum distances.
Network: Computation in Neural Systems, submitted (2012)
[PDF].
For questions and comments please contact me at "thomas.kreuz (at) cnr.it".
Notices
FOR SCIENTIFIC USE ONLY
These codes are free of charge for research and education purposes only. Any commercial or military use of this software is prohibited.
NO WARRANTY
The software on this site is provided "as-is," without any expressed or implied warranty. In no event I am liable for any damages arising from the use of the software. Since it is distributed for free, I do also not take responsibility for any eventual error in it.