Auryn simulator

Simulator for spiking neural networks with synaptic plasticity

User Tools

Site Tools


tutorials:tutorial_2

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:tutorial_2 [2016/09/02 04:41] – [Setting up neural populations] sentence structure zenketutorials:tutorial_2 [2018/02/28 17:58] (current) – [Visualizing the spikes] Adds gnuplot code for spike raster zenke
Line 6: Line 6:
 The code of this example can be found here The code of this example can be found here
 https://github.com/fzenke/auryn/blob/master/examples/sim_tutorial2.cpp https://github.com/fzenke/auryn/blob/master/examples/sim_tutorial2.cpp
 +
 +
 ===== Setting up neural populations ===== ===== Setting up neural populations =====
  
Line 31: Line 33:
 </code> </code>
  
-==== Connecting the network ====+===== Connecting the network =====
  
 Now let's connect these three populations. First the input: Now let's connect these three populations. First the input:
Line 51: Line 53:
 Note that we made inhibitory connections stronger by a factor of ''gamma = 4.0''. Note that we made inhibitory connections stronger by a factor of ''gamma = 4.0''.
  
-==== Set up monitors ====+===== Set up monitors =====
  
 Let's record spikes from all neurons and the membrane potential from neuron 0 in the excitatory population. Let's record spikes from all neurons and the membrane potential from neuron 0 in the excitatory population.
Line 63: Line 65:
  
  
-==== Running the simulation ====+===== Running the simulation =====
  
 To run the simulation for 10 seconds we simply add the run command: To run the simulation for 10 seconds we simply add the run command:
Line 78: Line 80:
  
  
-===== Visualizing the spikes =====+====== Visualizing the spikes ======
  
 Running above code will generate the following files: Running above code will generate the following files:
Line 89: Line 91:
 </code> </code>
  
-Let's take a look at the spikes (in the [[manual:ras]] file first).+Let's take a look at the spikes (in the [[manual:ras]] file first). In [[gnuplot]] this can be done as follows: 
 +<code> 
 +set xrange [2:5] 
 +set yrange [:5000] 
 +plot 'exc.0.ras' with dots lc -1 
 +</code> 
 {{ :tutorials:tutorial2_exc_spikes.png?300 |}} {{ :tutorials:tutorial2_exc_spikes.png?300 |}}
 That's a lot of spikes, but the image suggests that there is some synchrony going on at times, but there are also phases of asynchronous firing. Let's zoom in a bit more: That's a lot of spikes, but the image suggests that there is some synchrony going on at times, but there are also phases of asynchronous firing. Let's zoom in a bit more:
Line 114: Line 122:
 {{ :tutorials:tutorial2_exc_spikes_assembly.png?300 |}} {{ :tutorials:tutorial2_exc_spikes_assembly.png?300 |}}
  
-For more sophisticated ways of writing patterns or synfire chain structures into a connectivity matrix, check out the documentation of [[manual:SparseConnection]] and specifically the functions called ''load_patterns'' (see also http://www.fzenke.net/auryn/doxygen/current/classauryn_1_1SparseConnection.html). +For more sophisticated ways of writing patterns or synfire chain structures into a connectivity matrix, check out the documentation of [[manual:SparseConnection]] and specifically the functions called ''load_patterns'' (see also http://fzenke.net/auryn/doxygen/current/classauryn_1_1SparseConnection.html). 
 You can also always load a weight matrix from an external file which have generated using MATLAB or Python. Auryn supports a coordinate based [[http://math.nist.gov/MatrixMarket/|matrix market]] format which allows for the seamless exchange of weight matrices with external tools (see [[manual:wmat|matrix format]]). You can also always load a weight matrix from an external file which have generated using MATLAB or Python. Auryn supports a coordinate based [[http://math.nist.gov/MatrixMarket/|matrix market]] format which allows for the seamless exchange of weight matrices with external tools (see [[manual:wmat|matrix format]]).
  
tutorials/tutorial_2.1472791267.txt.gz · Last modified: 2016/09/02 04:41 by zenke