elephant.spike_train_surrogates.trial_shifting

elephant.spike_train_surrogates.trial_shifting(spiketrains, dither, n_surrogates=1)[source]

Generates surrogates of a spike train by trial shifting.

It shifts by a random uniform amount independently different trials, which are the elements of a list of spiketrains.

The shifting is done independently for each surrogate.

Parameters:
spiketrainslist of neo.SpikeTrain

A list of spike trains of the same neuron where each element corresponds to one trial.

ditherpq.Quantity

Amount of dithering.

n_surrogatesint, optional

Number of surrogates to be generated. Default: 1

Returns:
surrogate_spiketrainslist of list of neo.SpikeTrain

Each surrogate spike train obtained independently from spiketrain by randomly dithering its spikes. The range of the surrogate spike trains is the same as of spiketrain.