Beispiel #1
0
    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()
pulse_vec.record(pulses._ref_i)
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)
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',
Beispiel #3
0
from neuron import h
import matplotlib.pyplot as plt
import numpy as np

h.load_file('init_models_with_ca/init_model2.hoc')
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.dur3 = 100

# Set up recording vectors
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)
t_vec = h.Vector()
t_vec.record(h._ref_t)

# Simulation parameters
dt = 0.025
h.tstop = 1000 - dt
h.tuft.gbar_sca = 0
locations = [0, 0.1, 0.3, 0.5, 0.7, 0.9, 1]
probes = [0] * len(locations)

# Set up stimulus
stim = h.Ipulse2(h.soma(.5))
stim.amp = 2
stim.dur = 3
stim.delay = 500
stim.per = 10
stim.num = 1

# Set up recording vectors
for i in range(len(probes)):
    probes[i] = h.Vector()
    probes[i].record(h.apical(locations[i])._ref_v)
t_vec = h.Vector()
t_vec.record(h._ref_t)

dt = 0.025
h.tstop = 1000 - dt

lengths = np.array([200, 300, 400, 500, 600])

fig, axes = plt.subplots(1, 2, sharex='all', squeeze=False, figsize=(16, 8))

for i in range(lengths.size):
    h.apical.L = lengths[i]

    h('recalculate_passive_properties()')
    h('recalculate_channel_densities()')
    h('recalculate_geometry()')

    h.tuft.gbar_sca = 0

    return ()


h.load_file('init_models_with_ca/init_model2.hoc')
h.delete_section(sec=h.axon)
h.delete_section(sec=h.iseg)
h.delete_section(sec=h.hillock)

# Set up stimulus
default_amp = -40
default_dur = 10
stim = h.SEClamp(h.apical(1))
stim.amp1 = -70
stim.amp2 = default_amp
stim.amp3 = -70
stim.dur1 = 500
stim.dur2 = default_dur
stim.dur3 = 100

# Set up recording vectors
tuft_v_vec = h.Vector()
tuft_v_vec.record(h.tuft(.5)._ref_v)
t_vec = h.Vector()
t_vec.record(h._ref_t)

# Simulation parameters
dt = 0.025