spiketools.sim.sim_trials¶
- spiketools.sim.sim_trials(n_trials, method=None, time_pre=1, time_post=2, refractory=0.001, **kwargs)[source]¶
Simulate a collection of trials.
- Parameters:
- n_trialsint
Number of trials to simulate.
- method{‘poisson’}
The method to use for the simulation.
- time_pre, time_postfloat, optional, defaults: time_pre=1; time_post=2
The amount of time to simulate pre / post the event.
- 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:
- trial_spikeslist of 1d array
Simulated trials, where list has length of n_trials. Each simulated trial has simulated spike times for the time range [-time_pre, time_post].