Skip to content

Commit

Permalink
Fixed sim time
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Dec 9, 2023
1 parent 91a671b commit 28956f0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions snudda/simulate/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2056,8 +2056,8 @@ def clear_neuron(self):
help="Disable synapses")
parser.add_argument("--disableGJ", action="store_true", dest="disable_gapjunctions",
help="Disable gap junctions")
parser.add_argument("--time", type=float, default=1.5,
help="Duration of simulation in seconds")
parser.add_argument("--time", type=float, default=None,
help="Duration of simulation in seconds (must be set, or specified in simulation_config)")
parser.add_argument("--verbose", action="store_true")

parser.add_argument("--outputFile", help="Output hdf5 file (from simulation)", dest="output_file", default=None)
Expand Down Expand Up @@ -2128,10 +2128,13 @@ def clear_neuron(self):
record_cell_id = np.array([int(x) for x in args.record_all_synapses.split(",")])
sim.add_synapse_current_recording_all(record_cell_id)

t_sim = args.time * 1000 # Convert from s to ms for Neuron simulator
if args.time:
t_sim = args.time * 1000 # Convert from s to ms for Neuron simulator
else:
t_sim = None

sim.check_memory_status()
print(f"Running simulation for {t_sim} ms.")
# print(f"Running simulation for {t_sim} ms.")
sim.run(t_sim) # In milliseconds

print("Simulation done, saving output")
Expand Down

0 comments on commit 28956f0

Please sign in to comment.