elephant.spike_train_generation.compound_poisson_process¶
-
elephant.spike_train_generation.
compound_poisson_process
(rate, amplitude_distribution, t_stop, shift=None, t_start=array(0.) * ms)[source]¶ Generate a Compound Poisson Process (CPP; see [gen2]) with a given amplitude_distribution and stationary marginal rates rate.
The CPP process is a model for parallel, correlated processes with Poisson spiking statistics at pre-defined firing rates. It is composed of len(A)-1 spike trains with a correlation structure determined by the amplitude distribution : A[j] is the probability that a spike occurs synchronously in any j spike trains.
The CPP is generated by creating a hidden mother Poisson process, and then copying spikes of the mother process to j of the output spike trains with probability A[j].
Note that this function decorrelates the firing rate of each SpikeTrain from the probability for that SpikeTrain to participate in a synchronous event (which is uniform across SpikeTrains).
Parameters: - ratepq.Quantity
- Average rate of each spike train generated. Can be:
- a single value, all spike trains will have same rate rate
- an array of values (of length len(A)-1), each indicating the firing rate of one process in output
- amplitude_distributionnp.ndarray or list
CPP’s amplitude distribution . A[j] represents the probability of a synchronous event of size j among the generated spike trains. The sum over all entries of must be equal to one.
- t_stoppq.Quantity
The end time of the output spike trains.
- shiftpq.Quantity, optional
If None, the injected synchrony is exact. If shift is a pq.Quantity, all the spike trains are shifted independently by a random amount in the interval [-shift, +shift]. Default: None
- t_startpq.Quantity, optional
The t_start time of the output spike trains. Default: 0 pq.ms
Returns: - list of neo.SpikeTrain
A list of len(A) - 1 neo.SpikeTrains with specified firing rates forming the CPP with amplitude distribution .