spiketools.sim.times.sim_spiketimes_poisson¶
- spiketools.sim.times.sim_spiketimes_poisson(rate, duration, start_time=0, refractory=0.001)[source]¶
Simulate spike times based on a Poisson distribution.
- Parameters:
- ratefloat
The average firing rate for the simulated spike times.
- durationfloat
Duration of spike times to simulate, in seconds.
- start_time: float, optional
Timestamp of the start time for the simulated spike times.
- refractoryfloat, optional, default: 0.001
The refractory period to apply to the simulated data, in seconds.
- Returns:
- spike_times1d array
Simulated spike times, in seconds.
Examples
Simulate spike times at a rate of 10Hz for 5 seconds, starting at 2 seconds:
>>> spike_times = sim_spiketimes_poisson(10, 5, start_time=2)