728x90 반응형 SMALL brian22 [Brian] Introduction to Brian part 3 : Simulations Multiple runs # remember, this is here for running separate simulations in the same notebook start_scope() # Parameters num_inputs = 100 input_rate = 10*Hz weight = 0.1 # Range of time constants tau_range = linspace(1, 10, 30)*ms # Use this list to store output rates output_rates = [] # Iterate over range of time constants for tau in tau_range: # Construct the network each time P = PoissonGroup(.. 2022. 2. 14. [Brian] Introduction to Brian part 2 : Synapses The simplest Synapse start_scope() eqs = ''' dv/dt = (I-v)/tau : 1 I : 1 tau : second ''' G = NeuronGroup(2, eqs, threshold='v>1', reset='v = 0', method='exact') G.I = [2, 0] G.tau = [10, 100]*ms # Comment these two lines out to see what happens without Synapses S = Synapses(G, G, on_pre='v_post += 0.2') S.connect(i=0, j=1) M = StateMonitor(G, 'v', record=True) run(100*ms) plot(M.t/ms, M.v[0], l.. 2022. 2. 14. 이전 1 다음 728x90 반응형 LIST