TimedPoissonPopulation
TimedPoissonPopulation(self,
geometry,
rates,
schedule,=-1.0,
period=None,
name=False,
copied=0,
net_id )
Poisson population whose rate vary with the provided schedule.
Example:
= net.create(
inp
TimedPoissonPopulation(= 100,
geometry = [10., 20., 100., 20., 5.],
rates = [0., 100., 200., 500., 600.],
schedule
) )
This creates a population of 100 Poisson neurons whose rate will be:
- 10 Hz during the first 100 ms.
- 20 HZ during the next 100 ms.
- 100 Hz during the next 300 ms.
- 20 Hz during the next 100 ms.
- 5 Hz until the end of the simulation.
If you want the TimedPoissonPopulation to “loop” over the schedule, you can specify a period:
= net.create(
inp
TimedPoissonPopulation(= 100,
geometry = [10., 20., 100., 20., 5.],
rates = [0., 100., 200., 500., 600.],
schedule = 1000.,
period
) )
Here the rate will become 10Hz again every 1 second of simulation. If the period is smaller than the schedule, the remaining rates will not be set.
You can use the reset()
method to manually reinitialize the schedule, times becoming relative to that call:
1200.) # Should switch to 100 Hz due to the period of 1000.
net.simulate(
inp.reset()1000.) # Starts at 10 Hz again. net.simulate(
Note that the rates are reset to the value they had before compile().
The rates are here common to all neurons of the population. If you want each neuron to have a different rate, rates
must have additional dimensions corresponding to the geometry of the population. The first dimension still corresponds to the schedule.
= net.create(
inp
TimedPoissonPopulation(= 100,
geometry = [
rates 10. + 0.05*i for i in range(100)], # First 100 ms
[20. + 0.05*i for i in range(100)], # After 100 ms
[
],= [0., 100.],
schedule = 1000.,
period
) )
Parameters
Name | Type | Description | Default |
---|---|---|---|
rates | array of firing rates (list of floats or lists of numpy arrays). The first axis corresponds to the times where the firing rate should change and have the same length as schedule , if used. The other dimensions must match the geometry of the population. |
required | |
schedule | list of times (in ms) where the firing rate should change. | required | |
period | time when the timed array will be reset and start again, allowing cycling over the schedule. Default: no cycling (-1). | -1.0 |
|
name | optional name for the population. | None |