예제 #1
0
        postsynaptic=p2.id,
        synapse="gabaSyn",
        delay=2,
        weight=0.01,
    ))
net.projections[1].random_connectivity = RandomConnectivity(probability=1)

net.inputs.append(
    Input(id="stim",
          input_source=input_source.id,
          population=p0.id,
          percentage=50))

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
예제 #2
0
                                  presynaptic=p0.id,
                                  postsynaptic=p2.id,
                                  synapse='gabaSyn',
                                  delay=2,
                                  weight=0.01))
net.projections[1].random_connectivity=RandomConnectivity(probability=1)'''

net.inputs.append(
    Input(id="stim",
          input_source=input_source.id,
          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
예제 #3
0
                                  presynaptic=p0.id,
                                  postsynaptic=p2.id,
                                  synapse='gabaSyn',
                                  delay=2,
                                  weight=0.01))
net.projections[1].random_connectivity=RandomConnectivity(probability=1)'''

net.inputs.append(
    Input(id='stim',
          input_source=input_source.id,
          population=p0.id,
          percentage=100))

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',
                 recordTraces={'all': '*'},
                 recordSpikes={'pop0': '*'})

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