spiketools.sim.trials.sim_trials_poisson

spiketools.sim.trials.sim_trials_poisson(n_trials, rate_pre, rate_post, time_pre=1, time_post=2, refractory=0.001)[source]

Simulate a collection of trials, based on a Poisson spike time simulation.

Parameters:
n_trialsint

Number of trials to simulate.

rate_pre, rate_postfloat

The firing rates for the pre and post event times.

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.

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].