cell.insert('pas')
    cell.insert('hh')

    w = 0.002
    ach_w = 0.1
    da_w = 0.1

    syn = cell.add_synapse(source=None,
                           netcon_weight=w,
                           seg=soma(0.5),
                           mod_name="ExcSigma3Exp2SynAchDa",
                           tau1=1,
                           tau2=5)
    pp = syn.point_process
    ach_netcon = cell.add_netcon(source=None,
                                 point_process=pp,
                                 netcon_weight=ach_w + pp.hoc.ach_substractor,
                                 delay=1)
    da_netcon = cell.add_netcon(source=None,
                                point_process=pp,
                                netcon_weight=da_w + pp.hoc.da_substractor,
                                delay=1)

    debug = SynapticDebugger(init_v=-70, warmup=10)
    debug.add_syn(syn, key_press='w', syn_variables="w")
    debug.add_con(ach_netcon, key_press='a')
    debug.add_con(da_netcon, key_press='d')
    debug.add_seg(soma(0.5))

    debug.debug_interactive()
Beispiel #2
0
# Prepare cell
cell = Cell(name="cell", compile_paths=model_path1)
cell.load_morpho(filepath=model_path2)
cell.add_sec("dend[1]", diam=10, l=10, nseg=10)
cell.connect_secs(source="dend[1]", target="soma")
cell.insert("pas")
cell.insert("hh")

# Two examples of synapses with NetStim:
stim_cell = NetStimCell("stim_cell")
stim = stim_cell.make_netstim(start=250, number=30, interval=1)
soma = cell.filter_secs("soma")

# 1) Hoc-style synapse
pp = cell.add_point_process(mod_name="ExpSyn", seg=soma(0.5))
cell.add_netcon(source=stim, point_process=pp, netcon_weight=0.01, delay=1)

# 2) Recommended synapse
syn1 = cell.add_synapse(source=stim,
                        seg=soma(0.5),
                        netcon_weight=0.01,
                        mod_name="Syn4P",
                        delay=1)

# 3) Event synapse
syn2 = cell.add_synapse(source=None,
                        seg=soma(0.5),
                        netcon_weight=0.01,
                        mod_name="Syn4P",
                        delay=1)