Compute
Compute STTC profile for a pair of spike trains
sttcp(a, b, dt = 0.05, tau_max = 5, tau_step = 0.1, beg = NULL, end = NULL)
a |
spike train 1 |
b |
spike train 2 |
dt |
time window for STTC |
tau_max |
maximum time shift |
tau_step |
step size in tau |
beg |
start of recording. When NULL use the minimum spike time from the two trains. |
end |
end of recording. When NULL use the maximum spike time from the two trains. |
We extend the STTC to a profile (or correlogram) by shifting one spike train by amount tau, where tau varies in [-tau_max, +tau_max] in steps of tau_step.
List containing the STTC profile.
Stephen Eglen
t1 <- -cumsum(log(runif(1000)) / 2) t2 <- -cumsum(log(runif(1000)) / 2) corr <- sttcp(t1, t2) plot(corr, main="cross correlation") autocorr <- sttcp(t1, t1) plot(autocorr, main="auto correlation")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.