for ii in range(NN): print ii kernel = get_kernel(dt=dt, tf=tf, seed=seed+ii, number_of_processors=number_of_processors, verbose=verbose) background_population = PoissonPopulation('bg', 600, N, kernel) internal_population = IAFPSCDeltaPopulation('int', N, kernel, neuron_params=neuron_params) # for curr_gid in internal_population.gids: # kernel.SetStatus([curr_gid], {'V_m': IC_dist_data['edges'][IC_dist.rvs()]}) monitor = SpikeMonitor('int_m', internal_population, kernel) connect_one_to_one(background_population,internal_population, .001*.03, kernel, delay=0) connect_nsyn(internal_population, internal_population, 16, .001*.03, kernel) kernel.Simulate(tf*1000) t, y = monitor.firing_rate(0, tf, .005) try: y_tot += y except: y_tot = y print time.time()-t0 plt.plot(t, y_tot/NN) plt.show()
internal_population = IAFPSCDeltaPopulation('int', N, kernel, neuron_params=neuron_params) # for curr_gid in internal_population.gids: # kernel.SetStatus([curr_gid], {'V_m': IC_dist_data['edges'][IC_dist.rvs()]}) monitor = SpikeMonitor('int_m', internal_population, kernel) connect_one_to_one(background_population, internal_population, .001 * .03, kernel, delay=0) connect_nsyn(internal_population, internal_population, 16, .001 * .03, kernel) kernel.Simulate(tf * 1000) t, y = monitor.firing_rate(0, tf, .005) try: y_tot += y except: y_tot = y print time.time() - t0 plt.plot(t, y_tot / NN) plt.show()
kernel, neuron_params=neuron_params) # for curr_gid in internal_population.gids: # kernel.SetStatus([curr_gid], {'V_m': IC_dist_data['edges'][IC_dist.rvs()]}) monitor = SpikeMonitor('int_m', internal_population, kernel) connect_one_to_one(background_population, internal_population, .001 * weight_bg, kernel, delay=0) connect_nsyn(internal_population, internal_population, nsyn_recc, .001 * weight_recc, kernel, delay=delay) kernel.Simulate(tf * 1000) t, y = monitor.firing_rate(0, tf, .005) try: y_tot += y except: y_tot = y print time.time() - t0 plt.plot(t, y_tot / NN)
for ii in range(NN): print ii kernel = get_kernel(dt=dt, tf=tf, seed=seed+ii, number_of_processors=number_of_processors, verbose=verbose) background_population = PoissonPopulation('bg', bgfr, N, kernel) internal_population = IAFPSCDeltaPopulation('int', N, kernel, neuron_params=neuron_params) # for curr_gid in internal_population.gids: # kernel.SetStatus([curr_gid], {'V_m': IC_dist_data['edges'][IC_dist.rvs()]}) monitor = SpikeMonitor('int_m', internal_population, kernel) connect_one_to_one(background_population,internal_population, .001*weight_bg, kernel, delay=0) connect_nsyn(internal_population, internal_population, nsyn_recc, .001*weight_recc, kernel, delay=delay) kernel.Simulate(tf*1000) t, y = monitor.firing_rate(0, tf, .005) try: y_tot += y except: y_tot = y print time.time()-t0 plt.plot(t, y_tot/NN) plt.show()