File: spikesource.py

package info (click to toggle)
brian 2.9.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,872 kB
  • sloc: python: 51,820; cpp: 2,033; makefile: 108; sh: 72
file content (32 lines) | stat: -rw-r--r-- 999 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
__all__ = ["SpikeSource"]


class SpikeSource:
    """
    A source of spikes.

    An object that can be used as a source of spikes for objects such as
    `SpikeMonitor`, `Synapses`, etc.

    The defining properties of `SpikeSource` are that it should have:

    * A length that can be extracted with ``len(obj)``, where the maximum spike
      index possible is ``len(obj)-1``.
    * An attribute `spikes`, an array of ints each from 0 to
      ``len(obj)-1`` with no repeats (but possibly not in sorted order). This
      should be updated each time step.
    * A `clock` attribute, this will be used as the default clock for objects
      with this as a source.

    .. attribute:: spikes

        An array of ints, each from 0 to ``len(obj)-1`` with no repeats (but
        possibly not in sorted order). Updated each time step.

    .. attribute:: clock

        The clock on which the spikes will be updated.
    """

    # No implementation, just used for documentation purposes.
    pass