Пример #1
0
          population=p0.id,
          cell_ids=[1, 2]))

print(net.to_json())
new_file = net.to_json_file("%s.json" % net.id)
new_file_yaml = net.to_yaml_file("%s.yaml" % net.id)

################################################################################
###   Build Simulation object & save as JSON

sim = Simulation(
    id="Sim%s" % net.id,
    network=new_file,
    duration="100",
    dt="0.01",
    record_traces={"all": "*"},
    record_spikes={"pop0": "*"},
)

sim.to_json_file()
sim.network = new_file_yaml
sim.to_yaml_file('%s.yaml' % sim.id)

################################################################################
###   Run in some simulators

from neuromllite.NetworkGenerator import check_to_generate_or_run
import sys

check_to_generate_or_run(sys.argv, sim)
Пример #2
0
print(net.to_json())
net_json_file = net.to_json_file("%s.json" % net.id)
net_yaml_file = net.to_yaml_file("%s.yaml" % net.id)

################################################################################
###   Build Simulation object & save as JSON

sim = Simulation(
    id="SimExample4",
    network=net_json_file,
    duration="1000",
    dt="0.01",
    recordTraces={"all": "*"},
    recordSpikes={"pop0": "*"},
)

sim.to_json_file()
sim.network = net_yaml_file
sim.to_yaml_file()

sim.network = net_json_file  # reverting, for call below...

################################################################################
###   Run in some simulators

from neuromllite.NetworkGenerator import check_to_generate_or_run
import sys

check_to_generate_or_run(sys.argv, sim)