elephant.spike_train_generation.StationaryGammaProcess¶

class
elephant.spike_train_generation.
StationaryGammaProcess
(rate: quantities.quantity.Quantity, shape_factor: float, t_start: quantities.quantity.Quantity = array(0.) * s, t_stop: quantities.quantity.Quantity = array(1.) * s, equilibrium: bool = True)[source]¶ Generates spike trains whose spikes are realizations of a stationary Gamma process with the given rate and shape_factor starting at time t_start and stopping at time t_stop.
Parameters:  ratepq.Quantity
The constant firing rate.
 shape_factorfloat
The shape parameter of the gamma distribution.
 t_startpq.Quantity, optional
The start of the spike train. Default: 0.*pq.s
 t_stoppq.Quantity, optional
The end of the spike train. Default: 1.*pq.s
 equilibriumbool, optional
Generate an equilibrium or an ordinary renewal process. Default: True
Raises:  ValueError
If one of rate, t_start and t_stop is not of type pq.Quantity.
Examples
>>> import quantities as pq >>> spiketrain = StationaryGammaProcess( ... rate=50*pq.Hz, shape_factor=2.0, t_start=0*pq.ms, ... t_stop=1000*pq.ms).generate_spiketrain() >>> spiketrain_array = StationaryGammaProcess( ... rate=20*pq.Hz, shape_factor=5.0, t_start=5000*pq.ms, ... t_stop=10000*pq.ms).generate_spiketrain(as_array=True)
Methods
__init__
(rate, shape_factor[, t_start, ...])generate_n_spiketrains
(n_spiketrains[, as_array])Generates a list of spike trains. generate_spiketrain
([as_array])Generates a single spike train. Attributes
expected_cv
The expected coefficient of variation given the ISI distribution. t_start
t_start quantity; there are no spike times below this value. t_stop
t_stop quantity; there are no spike times above this value. 
property
expected_cv
¶ The expected coefficient of variation given the ISI distribution.

generate_n_spiketrains
(n_spiketrains: int, as_array: bool = False) Union[List[neo.core.spiketrain.SpikeTrain], List[numpy.ndarray]] ¶ Generates a list of spike trains.
Parameters:  n_spiketrainsint
The number of spike trains to generate.
 as_arraybool, optional
If True, a NumPy array of sorted spikes is returned, rather than a neo.SpikeTrain object. Default: False
Returns:  list_of_spiketrainlist of neo.SpikeTrain or list of np.ndarray
A list generated spike trains in the specified format.

generate_spiketrain
(as_array: bool = False) Union[neo.core.spiketrain.SpikeTrain, numpy.ndarray] ¶ Generates a single spike train.
Parameters:  as_arraybool, optional
If True, a NumPy array of sorted spikes is returned, rather than a neo.SpikeTrain object. Default: False
Returns:  spiketrainneo.SpikeTrain or np.ndarray
The generated spike train in the specified format.

property
t_start
¶ t_start quantity; there are no spike times below this value.

property
t_stop
¶ t_stop quantity; there are no spike times above this value.