run(10 * second) した後でt > 9[s] についてraster_plot()する
from brian import * all_neurons = NeuronGroup('省略') moni_spike_all = SpikeMonitor(all_neurons) run( 10 * second ) spikes = [s for s in moni_spike_all.spikes if s[1] >= 9*second] raster_plot_spiketimes(spikes) show()
raster_plot_spiketimesについて.
In [42]: raster_plot_spiketimes?? Type: function Base Class: <type 'function'> String Form:<function raster_plot_spiketimes at 0x106e49848> Namespace: Interactive File: /Library/Python/2.6/site-packages/brian/plotting.py Definition: raster_plot_spiketimes(spiketimes) Source: def raster_plot_spiketimes(spiketimes): """ Raster plot of a list of spike times """ m = Monitor() m.source = [] m.spikes = spiketimes raster_plot(m) t = array(spiketimes)[:,1]