User Tools

Site Tools


neurali:output_annarchy

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
neurali:output_annarchy [2016/07/06 22:30] profproneurali:output_annarchy [2020/06/08 22:20] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +un tutorial su pylab , plot() https://jakevdp.github.io/mpl_tutorial/tutorial_pages/tut1.html
 +
 +Per l'aiuto
 +
 +  >>> pylab.plot?
 +
 +Esempio
 +  m = Monitor(pop, ['g_exc', 'v', 'spike'], period=10.0, ranks=range(:100))
 +  simulate(100.0)
 +
 +  * popolazione da monitorare
 +  * parametri e variabili da monitorare
 +  * passo di monitoraggio (default=dt=1 ms)
 +  * 
 +
 +  s = m.get('spike' # array per Numpy (dimensioni array: tempo, indice_neurone).
 +  v = m.get('v')
 +  t, n = m.raster_plot(s)
 +  pylab.plot(t, n, 'b.', markersize=1.0) # disegna un puntino blu per ogni spike
 +  
 +In certi casi NON è necessario chiamare m.get() perché viene chiamato implicitamente da raster_plot()
 +  
 +  m = Monitor(pop, 'spike' # non ci sono altre variabili oltre a 'spike'
 +  simulate(1000.0)
 +  t, n = m.raster_plot()
 +  pylab.plot(t, n, '.'  # disegna un puntino per ogni spike
 +  pylab.show()
 +
 +
 +
 +--
 +
 + Beware: this erases the data from memory.
 +
 +  fr = m.mean_fr()
 +  r = m.population_rate(smooth=100.)