Skip to content

Commit

Permalink
fixed handling of output of sim.create() (was wrong order)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvbragin committed Feb 9, 2024
1 parent 2437975 commit 2cb58b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

- Made cells diversity work with popParams based on `cellsList` and `gridSpacing`

- Fixed handling of output of `sim.create()` (was wrong order)

# Version 1.0.5

**New features**
Expand Down
2 changes: 1 addition & 1 deletion examples/intervalSaveWeights/src/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def saveWeights(simTime):

print("Starting sim ...")

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, cfg, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, cfg, output=True)

# we run with an interval function defined above
# if you just want to save the data and not the wieghts you can use the sim.intervalSave function instead of saveWeights
Expand Down
2 changes: 1 addition & 1 deletion examples/intervalSaving/src/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

print("Starting sim ...")

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, cfg, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, cfg, output=True)

# saveInterval defines how often the data is saved
sim.runSimWithIntervalFunc(cfg.saveInterval, sim.intervalSave)
Expand Down
8 changes: 4 additions & 4 deletions netpyne/sim/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def createSimulate(netParams=None, simConfig=None, output=False):

from .. import sim

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, simConfig, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, simConfig, output=True)
sim.simulate()

if output:
Expand Down Expand Up @@ -210,7 +210,7 @@ def createSimulateAnalyze(netParams=None, simConfig=None, output=False):

from .. import sim

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, simConfig, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, simConfig, output=True)
sim.simulate()
sim.analyze()
if output:
Expand Down Expand Up @@ -254,7 +254,7 @@ def createSimulateAnalyzeInterval(netParams, simConfig, output=False, interval=N
import os
from .. import sim

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, simConfig, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, simConfig, output=True)
try:
if sim.rank == 0:
if os.path.exists('temp'):
Expand Down Expand Up @@ -317,7 +317,7 @@ def createSimulateAnalyzeDistributed(netParams, simConfig, output=False, filenam
import os
from .. import sim

(pops, cells, conns, stims, rxd, simData) = sim.create(netParams, simConfig, output=True)
(pops, cells, conns, rxd, stims, simData) = sim.create(netParams, simConfig, output=True)

sim.runSim()
sim.saveDataInNodes(filename=filename, saveLFP=includeLFP, removeTraces=False)
Expand Down

0 comments on commit 2cb58b0

Please sign in to comment.