m8ta
You are not authenticated, login. |
|
{763} | ||
I recently wrote a matlab script to measure & plot the autocorrelation of a spike train; to test it, I generated a series of timestamps from a homogeneous Poisson process: function [x, isi]= homopoisson(length, rate) % function [x, isi]= homopoisson(length, rate) % generate an instance of a poisson point process, unbinned. % length in seconds, rate in spikes/sec. % x is the timestamps, isi is the intervals between them. num = length * rate * 3; isi = -(1/rate).*log(1-rand(num, 1)); x = cumsum(isi); %%find the x that is greater than length. index = find(x > length); x = x(1:index(1,1)-1, 1); isi = isi(1:index(1,1)-1, 1); The autocorrelation of a Poisson process is, as it should be, flat: Above:
The problem with my recordings is that there is generally high long-range correlation, correlation which is destroyed by shuffling. Above is a plot of 1/isi for a noise channel with very high mean 'firing rate' (> 100Hz) in blue. Behind it, in red, is 1/shuffled isi. Noise and changes in the experimental setup (bad!) make the channel very non-stationary. Above is the autocorrelation plotted in the same way as figure 1. Normally, the firing rate is binned at 100Hz and high-pass filtered at 0.005hz so that long-range correlation is removed, but I turned this off for the plot. Note that the suffled data has a number of different offsets, primarily due to differing long-range correlations / nonstationarities. Same plot as figure 3, with highpass filtering turned on. Shuffled data still has far more local correlation - why? The answer seems to be in the relation between individual isis. Shuffling isi order obviuosly does not destroy the distribution of isi, but it does destroy the ordering or pair-wise correlation between isi(n) and isi(n+1). To check this, I plotted these two distributions: -- Original log(isi(n)) vs. log(isi(n+1) -- Shuffled log(isi_shuf(n)) vs. log(isi_shuf(n+1) -- Close-up of log(isi(n)) vs. log(isi(n+1) using alpha-blending for a channel that seems heavily corrupted with electro-cauterizer noise. |