elephant.spike_train_generation.single_interaction_process¶

elephant.spike_train_generation.
single_interaction_process
(rate, coincidence_rate, t_stop, n_spiketrains=2, jitter=array(0.) * ms, coincidences='deterministic', t_start=array(0.) * ms, min_delay=array(0.) * ms, return_coincidences=False)[source]¶ Generates a multidimensional Poisson SIP (single interaction process) plus independent Poisson processes [gen3].
A Poisson SIP consists of Poisson time series which are independent except for simultaneous events in all of them. This routine generates a SIP plus additional parallel independent Poisson processes.
Parameters:  t_stoppq.Quantity
Total time of the simulated processes. The events are drawn between 0 and t_stop.
 ratepq.Quantity
Overall mean rate of the time series to be generated (coincidence rate coincidence_rate is subtracted to determine the background rate). Can be: * a float, representing the overall mean rate of each process. If
so, it must be higher than coincidence_rate.
 an iterable of floats (one float per process), each float representing the overall mean rate of a process. If so, all the entries must be larger than coincidence_rate.
 coincidence_ratepq.Quantity
Coincidence rate (rate of coincidences for the ndimensional SIP). The SIP spike trains will have coincident events with rate coincidence_rate plus independent ‘background’ events with rate raterate_coincidence.
 n_spiketrainsint, optional
If rate is a single pq.Quantity value, n_spiketrains specifies the number of SpikeTrains to be generated. If rate is an array, n_spiketrains is ignored and the number of SpikeTrains is equal to len(rate). Default: 2
 jitterpq.Quantity, optional
Jitter for the coincident events. If jitter == 0, the events of all n correlated processes are exactly coincident. Otherwise, they are jittered around a common time randomly, up to +/ jitter. Default: 0 * pq.ms
 coincidences{‘deterministic’, ‘stochastic’}, optional
Whether the total number of injected coincidences must be determin istic (i.e. rate_coincidence is the actual rate with which coincidences are generated) or stochastic (i.e. rate_coincidence is the mean rate of coincidences):
 ‘deterministic’: deterministic rate
 ‘stochastic’: stochastic rate
Default: ‘deterministic’
 t_startpq.Quantity, optional
Starting time of the series. If specified, it must be lower than t_stop. Default: 0 * pq.ms
 min_delaypq.Quantity, optional
Minimum delay between consecutive coincidence times. Default: 0 * pq.ms
 return_coincidencesbool, optional
Whether to return the coincidence times for the SIP process Default: False
Returns:  outputlist
Realization of a SIP consisting of n_spiketrains Poisson processes characterized by synchronous events (with the given jitter). If return_coinc is True, the coincidence times are returned as a second output argument. They also have an associated time unit (same as t_stop).
Examples
>>> import quantities as pq >>> import elephant.spike_train_generation as stg >>> sip, coinc = stg.single_interaction_process( ... rate=20*pq.Hz, coincidence_rate=4.*pq.Hz, ... t_stop=1*pq.s, n_spiketrains=10, return_coincidences = True)