I_synI = gi * nS * (-85.*mV-v) : amp dge/dt = -ge/(1.0*ms) : 1 dgi/dt = -gi/(2.0*ms) : 1 ''' eqs_stdp_ee = ''' post2before : 1.0 dpre/dt = -pre/(tc_pre_ee) : 1.0 dpost1/dt = -post1/(tc_post_1_ee) : 1.0 dpost2/dt = -post2/(tc_post_2_ee) : 1.0 ''' eqs_stdp_pre_ee = 'pre = 1.; w -= nu_ee_pre * post1' eqs_stdp_post_ee = 'post2before = post2; w += nu_ee_post * pre * post2before; post1 = 1.; post2 = 1.' b.ion() fig_num = 1 neuron_groups = {} input_groups = {} connections = {} stdp_methods = {} rate_monitors = {} spike_monitors = {} spike_counters = {} result_monitor = np.zeros((update_interval,n_e)) neuron_groups['e'] = b.NeuronGroup(n_e*len(population_names), neuron_eqs_e, threshold= v_thresh_e, refractory= refrac_e, reset= scr_e, compile = True, freeze = True)
dv/dt = ((v_rest_i - v) + (I_synE+I_synI) / nS) / (10*ms) : volt (unless refractory) I_synE = ge * nS * -v : amp I_synI = gi * nS * (-85.*mV-v) : amp dge/dt = -ge/(1.0*ms) : 1 dgi/dt = -gi/(2.0*ms) : 1 ''' eqs_stdp_ee = ''' post2before : 1 dpre/dt = -pre/(tc_pre_ee) : 1 (event-driven) dpost1/dt = -post1/(tc_post_1_ee) : 1 (event-driven) dpost2/dt = -post2/(tc_post_2_ee) : 1 (event-driven) ''' eqs_stdp_pre_ee = 'pre = 1.; w = clip(w + nu_ee_pre * post1, 0, wmax_ee)' eqs_stdp_post_ee = 'post2before = post2; w = clip(w + nu_ee_post * pre * post2before, 0, wmax_ee); post1 = 1.; post2 = 1.' b2.ion() fig_num = 1 neuron_groups = {} input_groups = {} connections = {} rate_monitors = {} spike_monitors = {} spike_counters = {} result_monitor = np.zeros((update_interval,n_e)) neuron_groups['e'] = b2.NeuronGroup(n_e*len(population_names), neuron_eqs_e, threshold= v_thresh_e_str, refractory= refrac_e, reset= scr_e, method='euler') neuron_groups['i'] = b2.NeuronGroup(n_i*len(population_names), neuron_eqs_i, threshold= v_thresh_i_str, refractory= refrac_i, reset= v_reset_i_str, method='euler') #------------------------------------------------------------------------------ # create network population and recurrent connections