spiketools.sim.sim_spiketimes¶
- spiketools.sim.sim_spiketimes(spike_param, duration, method, refractory=0.001, **kwargs)[source]¶
Simulate spike times.
- Parameters:
- spike_paramfloat
Parameter value that controls the simulated spiking. For poisson, this is the spike rate.
- durationfloat
Duration of spike times to simulate, in seconds.
- method{‘poisson’}
The method to use for the simulation.
- refractoryfloat, optional, default: 0.001
The refractory period to apply to the simulated data, in seconds.
- **kwargs
Additional keyword arguments. There are passed into the simulate function specified by method.
- Returns:
- spike_times1d array
Simulated spike times, in seconds.
Examples
Simulate spike times at a rate of 5Hz for 3 seconds, using the poisson method:
>>> spike_times = sim_spiketimes(5, 3, 'poisson')