spikeArray = {'spike_times': [[0], [1], [13], [45], [93]]}  # in ms

# Presynaptic population - Input layer - Stimuli
pop_input = sim.Population(
    n_neurons,
    sim.SpikeSourceArray,
    spikeArray,
    # sim.SpikeSourcePoisson(), #(rate=1, duration=sim_time),
    label='pop_input')
# Postsynaptic population
"""
Notes:
    * Interesting property about this neuron model: voltage_based_synapses = True
    * Initial voltage value = -70.0
"""
pop_output = sim.Population(n_neurons, sim.Izhikevich(), label='pop_output')

sim.Projection(pop_input, pop_output, sim.OneToOneConnector(),
               sim.StaticSynapse(weight=20.0, delay=2))

# == Instrument the network ====================================================

# Record all to observe.
"""
Note:
    Recordables of the Izhikevich neuron model are limited with voltage, spikes, and unit(mV/ms) of the population.
"""
pop_output.record("all")

# === Run the simulation =======================================================
Esempio n. 2
0
 stn_cell_params = {
     'a': stn_a,
     'b': stn_b,
     'c': stn_c,
     'd': stn_d,
     'v_init': stn_v_init,
     'u_init': stn_u_init,
     'tau_syn_E': tau_ampa,
     'tau_syn_I': tau_gabaa,
     'i_offset': current_bias_stn,
     'isyn_exc': E_ampa,
     'isyn_inh': E_gabaa
 }
 ''' THE FIRST CHANNEL'''
 strd1_pop1 = p.Population(numCellsPerCol_STR,
                           p.Izhikevich(**strd1_cell_params),
                           label='strd1_pop1')
 strd2_pop1 = p.Population(numCellsPerCol_STR,
                           p.Izhikevich(**strd2_cell_params),
                           label='strd2_pop1')
 gpe_pop1 = p.Population(numCellsPerCol_GPe,
                         p.Izhikevich(**gpe_cell_params),
                         label='gpe_pop1')
 snr_pop1 = p.Population(numCellsPerCol_SNR,
                         p.Izhikevich(**snr_cell_params),
                         label='snr_pop1')
 stn_pop1 = p.Population(numCellsPerCol_STN,
                         p.Izhikevich(**stn_cell_params),
                         label='stn_pop1')
 fsi1_pop1 = p.Population(numCellsPerCol_FSI,
                          p.Izhikevich(**fsi_cell_params),
timestamp = 1.0  # simulate the network with 1.0 ms time steps
sim_time = 10  # total simulation time

# === Configure the simulator ==================================================

sim.setup(timestamp)

# === Build the network ========================================================

# Izhikevich neuron model
"""
Notes:
    * Interesting property about this neuron model: voltage_based_synapses = True
    * Initial voltage value = -70.0
"""
pop_exc = sim.Population(n_neurons, sim.Izhikevich(), label='pop_exc')

# == Instrument the network ====================================================

# Record all to observe.
"""
Note:
    Recordables of this neuron model are limited with voltage, spikes, and unit(mV/ms) of the population.
"""
pop_exc.record("all")

# === Run the simulation =======================================================

sim.run(sim_time)

# === Plot the results =========================================================
Esempio n. 4
0
populations = list()
projections = list()

weight_to_spike = 30
delay = 1

loopConnections = list()
for i in range(0, nNeurons):
    singleConnection = ((i, (i + 1) % nNeurons, weight_to_spike, delay))
    loopConnections.append(singleConnection)

injectionConnection = [(0, 0)]
spikeArray = {'spike_times': [[50]]}
populations.append(
    p.Population(nNeurons, p.Izhikevich(**cell_params_izk), label='pop_1'))
populations.append(
    p.Population(1, p.SpikeSourceArray(**spikeArray), label='inputSpikes_1'))

projections.append(
    p.Projection(populations[0], populations[0],
                 p.FromListConnector(loopConnections),
                 p.StaticSynapse(weight=weight_to_spike, delay=delay)))
projections.append(
    p.Projection(populations[1], populations[0],
                 p.FromListConnector(injectionConnection),
                 p.StaticSynapse(weight=weight_to_spike, delay=1)))

populations[0].record(['v', 'gsyn_exc', 'gsyn_inh', 'spikes'])

p.run(runtime)