spiketools.sim.utils.apply_refractory_times¶
- spiketools.sim.utils.apply_refractory_times(spike_times, refractory_time)[source]¶
Apply a refractory period to simulated spike times.
- Parameters:
- spike_times1d array
Spike times.
- refractory_timefloat
The duration of the refractory period, after a spike, in seconds.
- Returns:
- spike_times1d array
Spike times, with refractory period applied.
Examples
Apply a 0.003 seconds refractory period to a set of spike times:
>>> spike_times = np.array([0.512, 1.241, 1.242, 1.751, 2.124]) >>> apply_refractory_times(spike_times, 0.003) array([0.512, 1.241, 1.751, 2.124])