Back to the main page.

Bug 1108 - extend/replace ft_spikesimulation and add an example to the tutorial

Reported 2011-11-03 08:16:00 +0100
Modified 2013-01-15 22:10:17 +0100
Product: FieldTrip
Component: spike
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Martin Vinck
Depends on:
See also:

Arjen Stolk - 2011-11-03 08:16:12 +0100

Arjen Stolk - 2011-11-03 08:21:42 +0100

*** Bug 1109 has been marked as a duplicate of this bug. ***

Robert Oostenveld - 2012-06-05 14:42:50 +0200

Martin also has code for simulating spike trains. Together we have to come up with a framework function that allows the different types of simulations to be integrated.

Arjen Stolk - 2012-06-05 15:17:52 +0200

Created attachment 271 ft_spikesimulation

Arjen Stolk - 2012-06-05 15:22:12 +0200

agreed the attached version can also estimate the effect of presynaptic spiketrains on the postsynaptic dendritic charge, the resulting membrane potential, and the local field potential (of multiple neurons)

Arjen Stolk - 2012-06-05 15:23:35 +0200

(In reply to comment #4) .. and the effect of a cortical rhythm on the above ;)

Martin Vinck - 2012-06-05 15:27:46 +0200

The flow of the function is not entirely clear to me 1) output spike rates generated according to some probability model 2) simulation of the resulting dendritic currents by taking an EPSC function (which is conventionally taken as exp(-t/tau) 3) leaky-integration > this should then be the integral of the EPSC function, an EPSP (which is conventionally taken as the alpha function t*exp(-t/tau) 4) the addition of another cortical rhythm to the resulting LFP (what is the function of that?)

Martin Vinck - 2012-06-05 15:36:41 +0200

There are two types of functions that we could take to simulate the probability of spiking: 1) Based on a circular model. My suggestion would be to either use the cosine model function or the von mises model. The cosine function is given as pdf(tau) = (1 + k*cos(mu-phs))/2pi. The sine function you are using boils down to that in the end. The von Mises function is given as exp(k*cos(mu-phs))/2*pi*Bessel0(k) The cosine function is analytically very tractable and corresponds to the Taylor expansion of the von Mises around k = 0. With resultant length equal to k/2. So the resultant length of the distribution can then be easily controlled. The cosine model may not the best model for high phase concentrations as the von Mises distribution occurs more naturally for many applications for similar reasons as the Gaussian in the linear case. This model has been used e.g. in Vinck et al. (2011, Journal of Computational Neuroscience). --> As there is only one frequency here, it will cause an unrealistic peak in the spike-LFP locking spectrum. It's therefore better to create a mixture of the PDF or create some variation in the ongoing frequency. 2) Based on band pass filtered (Gaussian) white noise. In this case we can refer to Zeitler et al. (2006) who have created models of spiking probability and also given the analytic dependence of the spike-field coherence for a Poisson process. The disadvantage of this model is that the probability can not be easily controlled since the firing rate needs to be non-negative > since it's white noise any negative value can occur in theory.

Arjen Stolk - 2012-06-05 15:59:49 +0200

Yes, that would be the operations possible. This function was designed to simulate the influence of a cortical rhythm and spike rate of a neural population, hence the 4th implementation.

Arjen Stolk - 2012-06-05 16:00:59 +0200

With respect to your suggestions, I'm fine with you inserting them or even replacing the coarse versions that are in there (if you think they're of added value)

Martin Vinck - 2012-06-05 16:02:24 +0200

(In reply to comment #8) Yes, but why is that again in step 4? Isn't that implemented already in step 1 (the influence of the population rhythm on spiking activity). As the spike trains become rhythmic then, they create a rhythmic membrane potential / LFP.

Martin Vinck - 2012-06-07 07:29:38 +0200

In fact, the ft_spikedensity function already allows to convolve spike-trains with an alpha function (for examples, see test_ft_spikedensity) and would return what you call the 'membrane potential' trial-per-trial. It would be easy to add the exponential kernel so that after simulating the spikes you only have to call ft_spikedensity twice.

Arjen Stolk - 2012-06-07 09:13:43 +0200

Ok. I'm starting to lose overview of the functions. Will you document how to use the different steps? In case it's there already, sorry for my ignorance. :)

Arjen Stolk - 2012-07-18 10:20:15 +0200

Any luck here?

Martin Vinck - 2012-08-11 13:40:40 +0200

hi Arjen, I'm picking up the work again, put it on my list.