Skip to content

Commit

Permalink
fixed misleading console output when cfg.recordStims is On
Browse files Browse the repository at this point in the history
  • Loading branch information
vvbragin committed Jul 11, 2024
1 parent 5c1737f commit b68c2cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

- Fixed generating rhythmic spiking pattern with 'uniform' option

- Fixed misleading console output when cfg.recordStims is On

# Version 1.0.6

**New features**
Expand Down
7 changes: 6 additions & 1 deletion netpyne/sim/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,8 @@ def setupRecording():
break

if sim.cfg.recordStim:
if sim.cfg.verbose:
print(" Recording stims")
sim.simData['stims'] = Dict()
for cell in sim.net.cells:
cell.recordStimSpikes()
Expand Down Expand Up @@ -495,6 +497,8 @@ def setupRecording():

# record h.t
if sim.cfg.recordTime and len(sim.simData) > 0:
if sim.cfg.verbose:
print(" Recording h.t")
try:
sim.simData['t'] = h.Vector() # sim.cfg.duration/sim.cfg.recordStep+1).resize(0)
if hasattr(sim.cfg, 'use_local_dt') and sim.cfg.use_local_dt:
Expand All @@ -510,7 +514,8 @@ def setupRecording():
# print recorded traces
cat = 0
total = 0
for key in sim.simData:
keys = [k for k in sim.simData.keys() if k not in ['t', 'stims', 'spkt', 'spkid']]
for key in keys:
if sim.cfg.verbose:
print((" Recording: %s:" % key))
if len(sim.simData[key]) > 0:
Expand Down

0 comments on commit b68c2cb

Please sign in to comment.