elephant.spike_train_generation.StationaryGammaProcess

class elephant.spike_train_generation.StationaryGammaProcess(rate: Quantity, shape_factor: float, t_start: Quantity = array(0.) * s, t_stop: 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.