tutorials:tutorial_1
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| tutorials:tutorial_1 [2016/09/02 04:36] – [Adding some monitors] comment zenke | tutorials:tutorial_1 [2017/04/24 19:16] (current) – Changes links to fzenke.net zenke | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Tutorial 1 ====== | + | ====== Tutorial 1: Single neuron with Poisson input ====== |
| Here you will learn to simulate a single AdEx neuron and record spikes and membrane potentials. | Here you will learn to simulate a single AdEx neuron and record spikes and membrane potentials. | ||
| Line 8: | Line 8: | ||
| <code c++> | <code c++> | ||
| int main(int ac, char* av[]) | int main(int ac, char* av[]) | ||
| + | { | ||
| | | ||
| } | } | ||
| Line 17: | Line 18: | ||
| using namespace auryn; | using namespace auryn; | ||
| int main(int ac, char* av[]) | int main(int ac, char* av[]) | ||
| + | { | ||
| auryn_init( ac, av ); | auryn_init( ac, av ); | ||
| | | ||
| Line 24: | Line 26: | ||
| } | } | ||
| </ | </ | ||
| - | For convenience we also set our current namespace to Auryn' | + | For convenience we also set our current namespace to Auryn' |
| Line 82: | Line 84: | ||
| One comment is in order: Writing output to disk is computationally expensive. It's often possible to speed up a simulation substantially by reducing the amount of data that's saved. Choose the variables you want to record carefully and you will be rewarded with code that runs much faster. | One comment is in order: Writing output to disk is computationally expensive. It's often possible to speed up a simulation substantially by reducing the amount of data that's saved. Choose the variables you want to record carefully and you will be rewarded with code that runs much faster. | ||
| - | ===== Simulate | + | |
| + | |||
| + | ===== Simulating | ||
| Now all that's left to do is to tell the Auryn kernel how long we want to run our simulation. Let's say we want to run for 2 seconds. We write: | Now all that's left to do is to tell the Auryn kernel how long we want to run our simulation. Let's say we want to run for 2 seconds. We write: | ||
| Line 88: | Line 92: | ||
| sys-> | sys-> | ||
| </ | </ | ||
| - | + | where sys is the global pointer variable pointing to the Auryn kernel (which was initialized by '' | |
| ===== Running the simulation ===== | ===== Running the simulation ===== | ||
| Line 105: | Line 108: | ||
| </ | </ | ||
| - | ===== Visualizing the output ===== | + | |
| + | |||
| + | ====== Visualizing the output | ||
| Each monitor has written its own output file. Let's take a look at the membrane potential, which is the file with the [[manual: | Each monitor has written its own output file. Let's take a look at the membrane potential, which is the file with the [[manual: | ||
| - | I like plotting things in [[gnuplot]], | + | I like plotting things in [[http:// |
| Here is my voltage trace as plotted by Gnuplot: | Here is my voltage trace as plotted by Gnuplot: | ||
| Line 124: | Line 129: | ||
| In the [[Tutorial 2|next section]] you will learn how to simulate a recurrent network model instead of single neuron. | In the [[Tutorial 2|next section]] you will learn how to simulate a recurrent network model instead of single neuron. | ||
| - | ===== Exercises ===== | + | |
| + | |||
| + | ====== Exercises | ||
| * Play with different rate values for the Poisson processes | * Play with different rate values for the Poisson processes | ||
| * Replace the AdEx by an Izhikevich neuron | * Replace the AdEx by an Izhikevich neuron | ||
| * Add a second Poisson input population which provides inhibitory input to the output neuron | * Add a second Poisson input population which provides inhibitory input to the output neuron | ||
| * Simulate 2 or more neurons and connect them with sparse connectivity (see [[manual: | * Simulate 2 or more neurons and connect them with sparse connectivity (see [[manual: | ||
tutorials/tutorial_1.1472790996.txt.gz · Last modified: 2016/09/02 04:36 by zenke
