neurodsp.sim.sim_poisson_pop

neurodsp.sim.sim_poisson_pop(n_seconds, fs, n_neurons=1000, firing_rate=2, lam=None)[source]

Simulate a Poisson population.

Parameters
n_secondsfloat

Simulation time, in seconds.

fsfloat

Sampling rate of simulated signal, in Hz.

n_neuronsint, optional, default: 1000

Number of neurons in the simulated population.

firing_ratefloat, optional, default: 2

Firing rate of individual neurons in the population.

lamfloat, optional, default: None

Mean and variance of the Poisson distribution. None defaults to n_neurons * firing_rate.

Returns
sig1d array

Simulated population activity.

Notes

The simulated signal is essentially white noise, but satisfies the Poisson property, i.e. mean(X) = var(X).

The lambda parameter of the Poisson process (total rate) is determined as firing rate * number of neurons, i.e. summation of Poisson processes is still a Poisson processes.

Note that the Gaussian approximation for a sum of Poisson processes is only a good approximation for large lambdas.

Examples

Simulate a Poisson population:

>>> sig = sim_poisson_pop(n_seconds=1, fs=500, n_neurons=1000, firing_rate=2)