Attention: The EBRAINS drive will be unavailable for most of the weekend starting the 25th October. Although the Lab is availble while the Drive is down, files that are stored in the Drive will not be loaded and you will be unable to save documents directly on the Lab.


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

From version 11.4
edited by adavison
on 2021/09/30 14:18
Change comment: There is no comment for this version
To version 11.5
edited by adavison
on 2021/09/30 14:20
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -233,8 +233,7 @@
233 233   ),
234 234   title="Response of first five neurons with heterogeneous parameters",
235 235   annotations="Simulated with NEST"
236 -).show()(%%)
237 -\\**Run script in terminal, show figure**
236 +).show()
238 238  )))
239 239  
240 240  Now we want to create synaptic connections between the neurons in Population 1 and those in Population 2. There are lots of different ways these could be connected.
... ... @@ -311,10 +311,48 @@
311 311   ),
312 312   title="Response of first five neurons with heterogeneous parameters",
313 313   annotations="Simulated with NEST"
314 -).show()(%%)
315 -\\**Run script in terminal, show figure**
313 +).show()
316 316  )))
317 317  
316 +(% class="wikigeneratedid" %)
317 +Finally, let's update our figure, by adding a second panel to show the responses of Population 2.
318 +
319 +(% class="box infomessage" %)
320 +(((
321 +**Screencast** - current state of editor
322 +\\(% style="color:#000000" %)"""Simple network model using PyNN"""
323 +\\import pyNN.nest as sim(%%)
324 +(% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
325 +(% style="color:#000000" %)from pyNN.random import RandomDistribution(%%)
326 +(% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
327 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(
328 + (% style="color:#e74c3c" %) (% style="color:#000000" %)v_rest=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}),
329 + v_thresh=RandomDistribution('normal', {'mu': -55.0, 'sigma': 1.0}),
330 + v_reset=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}), (%%)
331 +(% style="color:#000000" %) t_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
332 +(% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")(%%)
333 +(% style="color:#000000" %)population2 = sim.Population(100, cell_type, label="Population 2")
334 +population2.set(i_offset=0)
335 +population1.record("v")
336 +population2.record("v")(%%)
337 +(% style="color:#e74c3c" %)connection_algorithm = sim.FixedProbabilityConnector(p=0.5)
338 +synapse_type = sim.StaticSynapse(weight=0.5, delay=0.5)
339 +connections = sim.Projection(population1, population2, connection_algorithm, synapse_type)(%%)
340 +(% style="color:#000000" %)sim.run(100.0)(%%)
341 +(% style="color:#000000" %)data_v = population1.get_data().segments[0].filter(name='v')[0]
342 +Figure(
343 + Panel(
344 + data_v[:, 0:5],
345 + xticks=True, xlabel="Time (ms)",
346 + yticks=True, ylabel="Membrane potential (mV)"
347 + ),
348 + title="Response of first five neurons with heterogeneous parameters",
349 + annotations="Simulated with NEST"
350 +).show()
351 +
352 +Run script in terminal, show figure
353 +)))
354 +
318 318  (% class="wikigeneratedid" id="HSummary28Inthistutorial2CyouhavelearnedtodoX202629" %)
319 319  (% class="small" %)**Summary (In this tutorial, you have learned to do X…)**
320 320