elephant.spike_train_surrogates.JointISI¶

class
elephant.spike_train_surrogates.
JointISI
(spiketrain, dither=array(15.) * ms, truncation_limit=array(100.) * ms, n_bins=100, sigma=array(2.) * ms, alternate=True, use_sqrt=False, method='window', cutoff=True, refractory_period=array(4.) * ms, isi_dithering=False)[source]¶ JointISI dithering implementation, based on the ideas from [sr1] and [sr2].
The main function is
JointISI.dithering()
.Parameters:  spiketrainneo.SpikeTrain
Input spiketrain to create surrogates of.
 ditherpq.Quantity, optional
This quantity describes the maximum displacement of a spike, when method is ‘window’. It is also used for the uniform dithering for the spikes, which are outside the regime in the JointISI histogram, where JointISI dithering is applicable. Default: 15. * pq.ms
 truncation_limitpq.Quantity, optional
The JointISI distribution of is defined within the range . Since this is computationally not feasible, the JointISI distribution is truncated for high ISI. The JointISI histogram is calculated for from 0 to truncation_limit. Default: 100. * pq.ms
 n_binsint, optional
The size of the jointISIdistribution will be n_bins*n_bins/2. Default: 100
 sigmapq.Quantity, optional
The standard deviation of the Gaussian kernel, with which the data is convolved. Default: 2. * pq.ms
 alternatebool, optional
If True, then all even spikes are dithered followed by all odd spikes. Otherwise, the spikes are dithered in ascending order from the first to the last spike. Default: True
 use_sqrtbool, optional
If True, the jointISI histogram is preprocessed by applying a square root (following [sr1]). Default: False
 method{‘fast’, ‘window’}, optional
 ‘fast’: the spike can move in the whole range between the
 previous and subsequent spikes (computationally efficient).
 ‘window’: the spike movement is limited to the parameter dither.
Default: ‘window’
 cutoffbool, optional
If True, then the filtering of the JointISI histogram is limited on the lower side by the minimal ISI. This can be necessary, if in the data there is a certain refractory period, which will be destroyed by the convolution with the 2dGaussian function. Default: True
 refractory_periodpq.Quantity, optional
Defines the refractory period of the dithered spiketrain unless the smallest ISI of the spiketrain is lower than this value. Default: 4. * pq.ms
 isi_ditheringbool, optional
If True, the JointISI distribution is evaluated as the outer product of the ISIdistribution with itself. Thus, all serial correlations are destroyed. Default: False
Methods
__init__
(spiketrain[, dither, ...])dithering
([n_surrogates])Implementation of JointISIdithering for spike trains that pass the threshold of the dense rate. joint_isi_histogram
()Calculates a 2D histogram of and applies square root or gaussian filtering if necessary. Attributes
MIN_SPIKES
bin_width
isi
The interspike intervals of the spiketrain. num_bins
refr_period

dithering
(n_surrogates=1)[source]¶ Implementation of JointISIdithering for spike trains that pass the threshold of the dense rate. If not, a uniform dithered spike train is given back.
Parameters:  n_surrogatesint
The number of dithered spiketrains to be returned. Default: 1
Returns:  dithered_stslist of neo.SpikeTrain
Spike trains, that are dithered versions of the given
spiketrain
.

property
isi
¶ The interspike intervals of the spiketrain.
Returns:  np.ndarray or None
An array of interspike intervals of the spiketrain. None, if not enough spikes in the spiketrain.