Page 1 of 1
Poisson distributed synaptic input
Posted: Fri May 12, 2006 1:43 pm
by fl
I'm modelling a pyramidal cell. How do I apply a poisson distributed synaptic input? I can't seem to find any information on this. NetStim has negexp distribution, not poisson. Thanks in advance.
Ted: thanks for your detailed reply to my previous question!
- FL
Poisson, negexp, and all that.
Posted: Sat May 13, 2006 12:25 am
by ted
When neuroscientists talk about Poisson distribution, they generally mean a 1 dimensional
Poisson process, which is to say, a series of events that happen at intervals that are
described by a negative exponential probability density. The number of events that occur
over an interval of time has a Poisson distribution. See
http://planetmath.org/encyclopedia/Pois ... iable.html
and
http://en.wikipedia.org/wiki/Poisson_process
poisson spikes using matlab
Posted: Thu May 18, 2006 4:27 pm
by jtmoyer
This is the matlab code we use for generating gamma/poisson distributions. We save the times out into a text file, then import them into neuron using the netcon.event command.
I got this off the web somewhere, but unfortunately I didn't keep track of where...
function [t,s] = fastgammatrain(duration,meanrate,order)
% function [t,s] = fastgammatrain(duration,meanrate,order)
%
% returns spike train output of an integrate and fire neuron with
% a random spiking threshold which is distributed according to
% a gamma distribution of order n. n=1 gives a poisson train.
% increasing n gives increasingly regular spike trains.
%
% where
% duration = duration of spiketrain (ms)
% meanrate = mean firing rate of the spike train (spikes/s)
% order = order of the gamma distribution for resetting threshold
%
% return parameters are:
% t = vector containing the time index for spike train (ms)
% s = spike train (1's represent spikes, 0's represent no spikes)
delta_t = 0.025; % resolution of spike train in ms
t = 0:delta_t:duration;
idur=length(t);
Vrandth = gamrnd(order,1/order,1,idur);
itonextspike =round(Vrandth/(meanrate/1000*delta_t));
itonextspike = itonextspike(itonextspike > 2); % refractory period = 0.002 ms
ispikes = cumsum(itonextspike);
ispikes = ispikes(ispikes < (duration/delta_t));
nspikes = length(ispikes);
s = sparse(1,ispikes,1,1,idur,nspikes);
if (nargout == 0)
plot(t,s)
end
s = full(s);
Posted: Sat Jun 17, 2006 3:29 am
by meager
Use the Inverse CDF formula for a Poisson random variable: F_x(x)=1-e^{-lambda x}
This can be rearranged to give:
x = -ln(1-F_x(x))/lambda
1- F_x(x) can be replaced by a Uniform random variable U(0,1).
So, to generate intervals and spike times for a Poisson input with a firing rate, lambda:
(MATLAB)
isi = -log(rand(1,Nspikes))/lambda;
spikes = cumsum(isi);
(NEURON)
objref isi, rand,spikes
rand = new Rand()
rand.uniform(0,1)
isi = new Vector(Nspikes)
isi.setrand(rand).log().mul(-lambda)
spikes = new Vector()
spikes.integral(isi)
Posted: Sat Jun 17, 2006 7:14 am
by Raj
meager wrote:(NEURON)
objref isi, rand,spikes
rand = new Rand()
rand.uniform(0,1)
isi = new Vector(Nspikes)
isi.setrand(rand).log().mul(-lambda)
spikes = new Vector()
spikes.integral(isi)
The code above gives a spiketrain with the same statistical properties as that generated by a NetStim object with noise set to 1 and the interval to 1/lambda and number=Nspikes. NetStim is the easiest solution if you need the spiketrain in a network to randomly activate a synapse.
Ted's remark
Ted wrote:
When neuroscientists talk about Poisson distribution, they generally mean a 1 dimensional
Poisson process, which is to say, a series of events that happen at intervals that are
described by a negative exponential probability density.
applies here.
Re: Poisson distributed synaptic input
Posted: Sun Nov 09, 2008 1:52 pm
by joe1234
A modified version of NetStim giving different orders of gamma distributions is available here:
http://senselab.med.yale.edu/simtooldb/ ... ool=116230
Joe