Last modified by adavison on 2022/10/04 13:55

From version 28.1
edited by adavison
on 2022/10/04 13:55
Change comment: There is no comment for this version
To version 20.1
edited by adavison
on 2021/12/01 15:21
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +1,6 @@
1 -
2 -(% class="box successmessage" %)
1 +(% class="box warningmessage" %)
3 3  (((
4 -[[https:~~/~~/www.youtube.com/watch?v=zBLNfJiEvRc>>https://www.youtube.com/watch?v=zBLNfJiEvRc]]
3 +tutorial under development
5 5  )))
6 6  
7 7  == Learning objectives ==
... ... @@ -45,7 +45,7 @@
45 45  **Slide** listing prerequisites
46 46  )))
47 47  
48 -To follow this tutorial, you need a basic knowledge of neuroscience (high-school level or higher), basic familiarity with the Python programming language, and you should have already followed our earlier tutorial video which guides you through the installation process.
47 +To follow this tutorial, you need a basic knowledge of neuroscience (high-school level or greater), basic familiarity with the Python programming language, and you should have already followed our earlier tutorial video which guides you through the installation process.
49 49  
50 50  This video covers PyNN 0.10. If you've installed a more recent version of PyNN, you might want to look for an updated version of this video.
51 51  
... ... @@ -85,7 +85,7 @@
85 85  
86 86  PyNN comes with a selection of integrate-and-fire models. We're going to use the IF_curr_exp model, where "IF" is for integrate-and-fire, "curr" means that synaptic responses are changes in current, and "exp" means that the shape of the current is a decaying exponential function.
87 87  
88 -This is where we set the parameters of the model: the resting membrane potential is -65 millivolts, the spike threshold is -55 millivolts, the reset voltage after a spike is again -65 millivolts, the refractory period after a spike is one millisecond, the membrane time constant is 10 milliseconds, and the membrane capacitance is 1 nanofarad. We're also going to inject a constant bias current of 1.1 nanoamps into these neurons, so that we get some action potentials.
87 +This is where we set the parameters of the model: the resting membrane potential is -65 millivolts, the spike threshold is -55 millivolts, the reset voltage after a spike is again -65 millivolts, the refractory period after a spike is one millisecond, the membrane time constant is 10 milliseconds, and the membrane capacitance is 1 nanofarad. We're also going to inject a constant bias current of 0.1 nanoamps into these neurons, so that we get some action potentials.
89 89  
90 90  (% class="box infomessage" %)
91 91  (((
... ... @@ -93,7 +93,7 @@
93 93  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
94 94  \\import pyNN.nest as sim
95 95  sim.setup(timestep=0.1)(%%)
96 -(% style="color:#e74c3c" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=1.1)
95 +(% style="color:#e74c3c" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=0.1)
97 97  )))
98 98  
99 99  Let's create 100 of these neurons; then, we're going to record the membrane voltage and run a simulation for 100 milliseconds.
... ... @@ -104,7 +104,7 @@
104 104  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
105 105  \\import pyNN.nest as sim
106 106  sim.setup(timestep=0.1)(%%)
107 -(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=1.1)(%%)
106 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
108 108  (% style="color:#e74c3c" %)population1 = sim.Population(100, cell_type, label="Population 1")
109 109  population1.record("v")
110 110  sim.run(100.0)(%%)
... ... @@ -120,7 +120,7 @@
120 120  \\import pyNN.nest as sim(%%)
121 121  (% style="color:#e74c3c" %)from pyNN.utility.plotting import Figure, Panel(%%)
122 122  (% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
123 -(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=1.1)(%%)
122 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, tau_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
124 124  (% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")
125 125  population1.record("v")
126 126  sim.run(100.0)(%%)
... ... @@ -167,14 +167,14 @@
167 167  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
168 168  \\import pyNN.nest as sim(%%)
169 169  (% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
170 -(% style="color:#e74c3c" %)from pyNN.random import RandomDistribution, NumpyRNG(%%)
169 +(% style="color:#e74c3c" %)from pyNN.random import RandomDistribution(%%)
171 171  (% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
172 -(% style="color:#e74c3c" %)rng = NumpyRNG(seed=1)(%%)
173 173  (% style="color:#000000" %)cell_type  = sim.IF_curr_exp(
174 - (% style="color:#e74c3c" %) v_rest=RandomDistribution('normal', mu=-65.0, sigma=1.0, rng=rng),
175 - v_thresh=RandomDistribution('normal', mu=-55.0, sigma=1.0, rng=rng),
176 - v_reset=RandomDistribution('normal', mu=-65.0, sigma=1.0, rng=rng), (%%)
177 -(% style="color:#000000" %) tau_refrac=1, tau_m=10, cm=1, i_offset=1.1)
172 + (% style="color:#e74c3c" %) v_rest=RandomDistribution('normal', mu=-65.0, sigma=1.0),
173 + v_thresh=RandomDistribution('normal', mu=-55.0, sigma=1.0),
174 + v_reset=RandomDistribution('normal', mu=-65.0, sigma=1.0), (%%)
175 +(% style="color:#000000" %) tau_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
176 +
178 178  
179 179  **...**
180 180  
... ... @@ -264,7 +264,7 @@
264 264  
265 265  **...**
266 266  (% style="color:#000000" %)population2.record("v")(%%)
267 -(% style="color:#e74c3c" %)connection_algorithm = sim.FixedProbabilityConnector(p_connect=0.5, rng=rng)
266 +(% style="color:#e74c3c" %)connection_algorithm = sim.FixedProbabilityConnector(p_connect=0.5)
268 268  synapse_type = sim.StaticSynapse(weight=0.5, delay=0.5)
269 269  connections = sim.Projection(population1, population2, connection_algorithm, synapse_type)(%%)
270 270  (% style="color:#000000" %)sim.run(100.0)(%%)
... ... @@ -308,20 +308,19 @@
308 308  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
309 309  \\import pyNN.(% style="color:#e74c3c" %)neuron(% style="color:#000000" %) as sim(%%)
310 310  (% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
311 -(% style="color:#000000" %)from pyNN.random import RandomDistribution, NumpyRNG(%%)
310 +(% style="color:#000000" %)from pyNN.random import RandomDistribution(%%)
312 312  (% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
313 -(% style="color:#000000" %)rng = NumpyRNG(seed=1)(%%)
314 314  (% style="color:#000000" %)cell_type  = sim.IF_curr_exp(
315 - v_rest=RandomDistribution('normal', mu=-65.0, sigma=1.0, rng=rng),
316 - v_thresh=RandomDistribution('normal', mu=-55.0, sigma=1.0, rng=rng),
317 - v_reset=RandomDistribution('normal', mu=-65.0, sigma=1.0, rng=rng)
318 - tau_refrac=1, tau_m=10, cm=1, i_offset=1.1)
319 -population1 = sim.Population(100, cell_type, label="Population 1")
320 -population2 = sim.Population(100, cell_type, label="Population 2")
313 + (% style="color:#e74c3c" %) (% style="color:#000000" %)v_rest=RandomDistribution('normal', mu=-65.0, sigma=1.0),
314 + v_thresh=RandomDistribution('normal', mu=-55.0, sigma=1.0),
315 + v_reset=RandomDistribution('normal', mu=-65.0, sigma=1.0), (%%)
316 +(% style="color:#000000" %) tau_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
317 +(% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")(%%)
318 +(% style="color:#000000" %)population2 = sim.Population(100, cell_type, label="Population 2")
321 321  population2.set(i_offset=0)
322 322  population1.record("v")
323 -population2.record("v")
324 -connection_algorithm = sim.FixedProbabilityConnector(p_connect=0.5, rng=rng)
321 +population2.record("v")(%%)
322 +(% style="color:#000000" %)connection_algorithm = sim.FixedProbabilityConnector(p_connect=0.5)
325 325  synapse_type = sim.StaticSynapse(weight=0.5, delay=0.5)
326 326  connections = sim.Projection(population1, population2, connection_algorithm, synapse_type)(%%)
327 327  (% style="color:#000000" %)sim.run(100.0)(%%)
... ... @@ -357,7 +357,7 @@
357 357  
358 358  Of course, PyNN allows you to create much more complex networks than this, with more realistic neuron models, synaptic plasticity, spatial structure, and so on. You can also use other simulators, such as Brian or SpiNNaker, and you can run simulations in parallel on clusters or supercomputers.
359 359  
360 -We will be releasing a series of tutorials, throughout this year, to introduce these more advanced features of PyNN, so keep an eye on the EBRAINS website.
358 +We will be releasing a series of tutorials, throughout the rest of 2021 and 2022, to introduce these more advanced features of PyNN, so keep an eye on the EBRAINS website.
361 361  
362 362  (% class="box successmessage" %)
363 363  (((