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

From version 15.1
edited by adavison
on 2021/09/30 15:30
Change comment: There is no comment for this version
To version 14.1
edited by adavison
on 2021/09/30 15:27
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -142,11 +142,17 @@
142 142  
143 143  (% class="box infomessage" %)
144 144  (((
145 -**Screencast** - changes in editor
146 -
147 -
148 -**...**
149 -(% style="color:#000000" %)Figure(
145 +**Screencast** - current state of editor
146 +\\(% style="color:#000000" %)"""Simple network model using PyNN"""
147 +\\import pyNN.nest as sim(%%)
148 +(% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
149 +(% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
150 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(v_rest=-65, v_thresh=-55, v_reset=-65, t_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
151 +(% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")
152 +population1.record("v")
153 +sim.run(100.0)(%%)
154 +(% style="color:#000000" %)data_v = population1.get_data().segments[0].filter(name='v')[0]
155 +Figure(
150 150   Panel(
151 151   data_v[:, (% style="color:#e74c3c" %)0:5(% style="color:#000000" %)],
152 152   xticks=True, xlabel="Time (ms)",
... ... @@ -162,7 +162,7 @@
162 162  
163 163  (% class="box infomessage" %)
164 164  (((
165 -**Screencast** - changes in editor
171 +**Screencast** - current state of editor
166 166  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
167 167  \\import pyNN.nest as sim(%%)
168 168  (% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
... ... @@ -173,12 +173,11 @@
173 173   v_thresh=RandomDistribution('normal', {'mu': -55.0, 'sigma': 1.0}),
174 174   v_reset=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}), (%%)
175 175  (% style="color:#000000" %) t_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
176 -
177 -
178 -**...**
179 -
180 -
181 -(% style="color:#000000" %)Figure(
182 +(% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")
183 +population1.record("v")
184 +sim.run(100.0)(%%)
185 +(% style="color:#000000" %)data_v = population1.get_data().segments[0].filter(name='v')[0]
186 +Figure(
182 182   Panel(
183 183   data_v[:, 0:5],
184 184   xticks=True, xlabel="Time (ms)",
... ... @@ -202,8 +202,17 @@
202 202  
203 203  (% class="box infomessage" %)
204 204  (((
205 -**Screencast** - changes in editor
206 -\\**...**
210 +**Screencast** - current state of editor
211 +\\(% style="color:#000000" %)"""Simple network model using PyNN"""
212 +\\import pyNN.nest as sim(%%)
213 +(% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
214 +(% style="color:#000000" %)from pyNN.random import RandomDistribution(%%)
215 +(% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
216 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(
217 + (% style="color:#e74c3c" %) (% style="color:#000000" %)v_rest=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}),
218 + v_thresh=RandomDistribution('normal', {'mu': -55.0, 'sigma': 1.0}),
219 + v_reset=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}), (%%)
220 +(% style="color:#000000" %) t_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
207 207  (% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")(%%)
208 208  (% style="color:#e74c3c" %)population2 = sim.Population(100, cell_type, label="Population 2")
209 209  population2.set(i_offset=0)(%%)
... ... @@ -210,7 +210,16 @@
210 210  (% style="color:#000000" %)population1.record("v")(%%)
211 211  (% style="color:#e74c3c" %)population2.record("v")(%%)
212 212  (% style="color:#000000" %)sim.run(100.0)(%%)
213 -**...**
227 +(% style="color:#000000" %)data_v = population1.get_data().segments[0].filter(name='v')[0]
228 +Figure(
229 + Panel(
230 + data_v[:, 0:5],
231 + xticks=True, xlabel="Time (ms)",
232 + yticks=True, ylabel="Membrane potential (mV)"
233 + ),
234 + title="Response of first five neurons with heterogeneous parameters",
235 + annotations="Simulated with NEST"
236 +).show()
214 214  )))
215 215  
216 216  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.
... ... @@ -258,16 +258,36 @@
258 258  
259 259  (% class="box infomessage" %)
260 260  (((
261 -**Screencast** - changes in editor
262 -
263 -
264 -**...**
265 -(% style="color:#000000" %)population2.record("v")(%%)
284 +**Screencast** - current state of editor
285 +\\(% style="color:#000000" %)"""Simple network model using PyNN"""
286 +\\import pyNN.nest as sim(%%)
287 +(% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)
288 +(% style="color:#000000" %)from pyNN.random import RandomDistribution(%%)
289 +(% style="color:#000000" %)sim.setup(timestep=0.1)(%%)
290 +(% style="color:#000000" %)cell_type  = sim.IF_curr_exp(
291 + (% style="color:#e74c3c" %) (% style="color:#000000" %)v_rest=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}),
292 + v_thresh=RandomDistribution('normal', {'mu': -55.0, 'sigma': 1.0}),
293 + v_reset=RandomDistribution('normal', {'mu': -65.0, 'sigma': 1.0}), (%%)
294 +(% style="color:#000000" %) t_refrac=1, tau_m=10, cm=1, i_offset=0.1)(%%)
295 +(% style="color:#000000" %)population1 = sim.Population(100, cell_type, label="Population 1")(%%)
296 +(% style="color:#000000" %)population2 = sim.Population(100, cell_type, label="Population 2")
297 +population2.set(i_offset=0)
298 +population1.record("v")
299 +population2.record("v")(%%)
266 266  (% style="color:#e74c3c" %)connection_algorithm = sim.FixedProbabilityConnector(p=0.5)
267 267  synapse_type = sim.StaticSynapse(weight=0.5, delay=0.5)
268 268  connections = sim.Projection(population1, population2, connection_algorithm, synapse_type)(%%)
269 269  (% style="color:#000000" %)sim.run(100.0)(%%)
270 -**...**
304 +(% style="color:#000000" %)data_v = population1.get_data().segments[0].filter(name='v')[0]
305 +Figure(
306 + Panel(
307 + data_v[:, 0:5],
308 + xticks=True, xlabel="Time (ms)",
309 + yticks=True, ylabel="Membrane potential (mV)"
310 + ),
311 + title="Response of first five neurons with heterogeneous parameters",
312 + annotations="Simulated with NEST"
313 +).show()
271 271  )))
272 272  
273 273  (% class="wikigeneratedid" %)
... ... @@ -275,8 +275,25 @@
275 275  
276 276  (% class="box infomessage" %)
277 277  (((
278 -**Screencast** - changes in editor
279 -\\**...**
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:#000000" %)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)(%%)
280 280  (% style="color:#000000" %)sim.run(100.0)(%%)
281 281  (% style="color:#e74c3c" %)data1_v(% style="color:#000000" %) = population1.get_data().segments[0].filter(name='v')[0](%%)
282 282  (% style="color:#e74c3c" %)data2_v = population2.get_data().segments[0].filter(name='v')[0](%%)
... ... @@ -303,7 +303,7 @@
303 303  
304 304  (% class="box infomessage" %)
305 305  (((
306 -**Screencast** - final state of editor
366 +**Screencast** - current state of editor
307 307  \\(% style="color:#000000" %)"""Simple network model using PyNN"""
308 308  \\import pyNN.(% style="color:#e74c3c" %)neuron(% style="color:#000000" %) as sim(%%)
309 309  (% style="color:#000000" %)from pyNN.utility.plotting import Figure, Panel(%%)