pulses_num=0, pulses_period=10): stim.amp, stim.dur, stim.delay = Is, Is_dur, Is_onset apical_stim.amp, apical_stim.dur, apical_stim.delay = Ia, Ia_dur, Ia_onset tuft_stim.amp, tuft_stim.dur, tuft_stim.delay = It, It_dur, It_onset epsp.imax, epsp.tau0, epsp.tau1, epsp.onset = Id_max, Id_rise, Id_decay, Id_onset pulses.delay, pulses.dur, pulses.per, pulses.num, pulses.amp = pulses_onset, pulses_dur, pulses_period, pulses_num, pulses_amp h.tstop = simdur - dt h.run() h.load_file('init_models_with_ca/init_model2.hoc') # Set up stimulus stim = h.IClamp(h.soma(0.5)) epsp = h.epsp(h.tuft(0.5)) pulses = h.Ipulse2(h.soma(0.5)) apical_stim = h.IClamp(h.apical(.5)) tuft_stim = h.IClamp(h.tuft(.5)) # Set up recording vectors soma_v_vec = h.Vector() soma_v_vec.record(h.soma(0.5)._ref_v) apical_v_vec = h.Vector() apical_v_vec.record(h.apical(0.5)._ref_v) tuft_v_vec = h.Vector() tuft_v_vec.record(h.tuft(0.5)._ref_v) stim_vec = h.Vector() stim_vec.record(stim._ref_i) epsp_vec = h.Vector() epsp_vec.record(epsp._ref_i)
h('recalculate_geometry()') print('i: ' + str(i)) for j in range(z[0, :].size): h.tuft.gbar_sca = sca[j] h.run() tuftv = np.array(tuft_v_vec)[20000:28000] z[i, j] = np.trapz(tuftv) return (z) h.load_file('init_models_with_ca/init_model2.hoc') soma_v_vec = h.Vector() soma_v_vec.record(h.soma(0.5)._ref_v) tuft_v_vec = h.Vector() tuft_v_vec.record(h.tuft(0.5)._ref_v) stim = h.IClamp(h.soma(0.5)) stim.amp = 1 stim.dur = 5 stim.delay = 500 stim_vec = h.Vector() stim_vec.record(stim._ref_i) epsp = h.epsp(h.tuft(0.5)) epsp.imax = 0.5 epsp.tau0 = 0.5 epsp.tau1 = 5 epsp.onset = 505
# Set up stimulus stim = h.Ipulse2(h.soma(.5)) stim.amp = 2 stim.dur = 3 stim.delay = 500 stim.per = 10 stim.num = 3 # Set up recording vectors soma_v_vec = h.Vector() soma_v_vec.record(h.soma(.5)._ref_v) apical_end_v_vec = h.Vector() apical_end_v_vec.record(h.apical(1)._ref_v) tuft_v_vec = h.Vector() tuft_v_vec.record(h.tuft(.5)._ref_v) stim_vec = h.Vector() stim_vec.record(stim._ref_i) t_vec = h.Vector() t_vec.record(h._ref_t) # Simulation parameters dt = 0.025 h.tstop = 1000 - dt l = np.array([200, 300, 400, 500, 600]) fig, axes = plt.subplots(3, l.size, sharey='row', sharex='all', squeeze=False,
h.delete_section(sec=h.axon) h.delete_section(sec=h.iseg) h.delete_section(sec=h.hillock) # Set up stimulus stim = h.SEClamp(h.apical(1)) stim.amp1 = -70 stim.amp2 = -40 stim.amp3 = -70 stim.dur1 = 500 stim.dur2 = 10 stim.dur3 = 100 # Set up recording vectors tuft_ica_vec = h.Vector() tuft_ica_vec.record(h.tuft(.5)._ref_ica) t_vec = h.Vector() t_vec.record(h._ref_t) # Simulation parameters dt = 0.025 h.tstop = 1000 - dt width = np.linspace(0, 50, 20) voltage = np.linspace(0, -70, 20) burst = np.zeros([width.size, voltage.size]) for i in range(width.size): for j in range(voltage.size): stim.dur2 = width[i]