elephant.spike_train_generation.NonStationaryPoissonProcess

class elephant.spike_train_generation.NonStationaryPoissonProcess(rate_signal: AnalogSignal, refractory_period: Quantity | None = None)[source]

Generates spike trains whose spikes are realizations of a non-stationary Poisson process with the given rate-signal. Optionally, you can specify a dead time.

Parameters:
rate_signalneo.AnalogSignal

A neo.AnalogSignal representing the rate profile evolving over time.Its values have all to be >=0. The generated spike trains will have t_start = rate.t_start and t_stop = rate.t_stop

refractory_periodpq.Quantity, optional

The time period after one spike in which no other spike is emitted. This can be called an absolute refractory period or a dead time. Default : None

Raises:
ValueError

If rate_signal is not a neo AnalogSignal If rate_signal contains a negative value. If rate_signal is empty. If refractory_period is not of type pq.Quantity nor None.

Methods

__init__(rate_signal[, refractory_period])

generate_n_spiketrains(n_spiketrains[, as_array])

Generates a list of spike trains.

generate_spiketrain([as_array])

Generates a single spike train.

Attributes

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.