# PoissonGroup class

(Shortest import: `from brian2 import PoissonGroup)`

class brian2.input.poissongroup.PoissonGroup(*args, **kw)

  Bases: `Group`, `SpikeSource`

  Poisson spike source

  Parameters:

    N : int

    > Number of neurons

    rates : `Quantity`, str

    > Single rate, array of rates of length N, or a string expression evaluating to a rate. This string expression will be evaluated at every time step, it can therefore be time-dependent (e.g. refer to a `TimedArray`).

    dt : `Quantity`, optional

    > The time step to be used for the simulation. Cannot be combined with the `clock` argument.

    clock : `Clock`, optional

    > The update clock to be used. If neither a clock, nor the `dt` argument is specified, the `defaultclock` will be used.

    when : str, optional

    > When to run within a time step, defaults to the `'thresholds'` slot. See Scheduling for possible values.

    order : int, optional

    > The priority of of this group for operations occurring at the same time step and in the same scheduling slot. Defaults to 0.

    name : str, optional

    > Unique name, or use poissongroup, poissongroup_1, etc.

  Attributes

  `spikes` | The spikes returned by the most recent thresholding operation.

  Methods

  `before_run`([run_namespace]) | Optional method to prepare the object before a run.

  Details

  spikes

    The spikes returned by the most recent thresholding operation.

  before_run(run_namespace=None)

    Optional method to prepare the object before a run.

    Called by `Network.after_run` before the main simulation loop starts.

## Tutorials and examples using this

- Tutorial 3-intro-to-brian-simulations

- Example adaptive_threshold

- Example advanced/custom_events

- Example frompapers/Diehl_Cook_2015

- Example frompapers/Stimberg_et_al_2018/example_4_rsmean

- Example frompapers/Stimberg_et_al_2018/example_4_synrel

- Example frompapers/Wang_2002

- Example standalone/STDP_standalone

- Example standalone/standalone_multiple_processes

- Example standalone/standalone_multiplerun

- Example synapses/STDP

- Example synapses/homeostatic_stdp_at_inhibitory_synapes

- Example synapses/spike_based_homeostasis