frombrian2importSpikeMonitor)
brian2.monitors.spikemonitor.
SpikeMonitor
(*args, **kw)[source]¶brian2.monitors.spikemonitor.EventMonitor
NeuronGroup
or other spike source.i
and t
store all the indicesand spike times, respectively. Alternatively, you can get a dictionarymapping neuron indices to spike trains, by calling the spike_trains
method. If you record additional variables with the variables
argument,these variables can be accessed by their name (see Examples).NeuronGroup
, SpikeSource
)i
and t
(the count
willalways be recorded). Defaults to True
.source.name+'_spikemonitor_0'
, etc.The array of spike counts (length = size of target group) |
Returns the total number of recorded spikes. |
all_values () | Return a dictionary mapping recorded variable names (including t ) to a dictionary mapping neuron indices to arrays of variable values at the time of the spikes (sorted by time). |
spike_trains () | Return a dictionary mapping spike indices to arrays of spike times. |
values (var) | Return a dictionary mapping neuron indices to arrays of variable values at the time of the spikes (sorted by time). |
count
¶num_spikes
¶all_values
()[source]¶t
)to a dictionary mapping neuron indices to arrays of variable values atthe time of the spikes (sorted by time). This is equivalent to (but moreefficient than) calling values
for each variable and storing theresult in a dictionary.spike_trains
()[source]¶values
(var)[source]¶Dec 13 | Dec 12 | Dec 11 | Dec 10 | Dec 9 | Dec 8 | Dec 7 | Dec 6 | Dec 5 | Dec 4 | Dec 3 | Dec 2 | Dec 1 | Nov 30 | Nov 29 | Nov 28 | Nov 27 | Nov 26 | Nov 25 | Nov 24 | Nov 23 | Nov 22 | Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 2 | 3 | 0 | 2 | 2 | 3 | 1 | 2 | 1 | 2 | 1 | 3 | 1 | 3 | 3 | 0 | 1 | 0 | 3 | 1 | 2 | 1 | 0 | 3 | 1 | 0 | 1 | 3 | 0 | 1 | 3 | 2 | 1 | 1 | 0 | 4 | 2 | 4 | 1 | 4 | 3 | 2 | 4 | 2 | 1 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 1 | 1 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |