spiketools.stats.shuffle.shuffle_isis¶
- spiketools.stats.shuffle.shuffle_isis(spikes, n_shuffles=1000, start_time=0)[source]¶
Create shuffled spike times using permuted inter-spike intervals.
- Parameters:
- spikes1d array
Spike times, in seconds.
- n_shufflesint, optional, default: 1000
The number of shuffles to create.
- start_timefloat, optional
The start time of the input spikes, used to set the time values of the shuffled outputs.
- Returns:
- shuffled_spikes2d array
Shuffled spike times.
Examples
Shuffle spike times using the ISI shuffle method:
>>> from spiketools.sim.times import sim_spiketimes >>> spikes = sim_spiketimes(5, 30, 'poisson') >>> shuffled_spikes = shuffle_isis(spikes, n_shuffles=5)