Beispiel #1
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)
pulse_vec = h.Vector()
def measure_width(trace):
    trace = np.array(trace)

    points = np.where(trace > (trace[15000] + 2))[0]
    points = points[np.logical_and(points >= 20000, points <= 30000)]

    width = dt * (points[-1] - points[0])

    return (width)


h.load_file('init_models_with_ca/init_model2.hoc')
default_sca = h.tuft.gbar_sca

# 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)