| 1 |
__all__ = ["SpikeSource"] |
| 2 |
|
| 3 |
|
| 4 |
class SpikeSource: |
| 5 |
""" |
| 6 |
A source of spikes. |
| 7 |
|
| 8 |
An object that can be used as a source of spikes for objects such as |
| 9 |
`SpikeMonitor`, `Synapses`, etc. |
| 10 |
|
| 11 |
The defining properties of `SpikeSource` are that it should have: |
| 12 |
|
| 13 |
* A length that can be extracted with ``len(obj)``, where the maximum spike |
| 14 |
index possible is ``len(obj)-1``. |
| 15 |
* An attribute `spikes`, an array of ints each from 0 to |
| 16 |
``len(obj)-1`` with no repeats (but possibly not in sorted order). This |
| 17 |
should be updated each time step. |
| 18 |
* A `clock` attribute, this will be used as the default clock for objects |
| 19 |
with this as a source. |
| 20 |
|
| 21 |
.. attribute:: spikes |
| 22 |
|
| 23 |
An array of ints, each from 0 to ``len(obj)-1`` with no repeats (but |
| 24 |
possibly not in sorted order). Updated each time step. |
| 25 |
|
| 26 |
.. attribute:: clock |
| 27 |
|
| 28 |
The clock on which the spikes will be updated. |
| 29 |
""" |
| 30 |
|
| 31 |
# No implementation, just used for documentation purposes. |
| 32 |
pass |