Beispiel #1
0

WEIGHT = 0.0035		# µS, conductance of (single) synaptic potentials
WARMUP = 200


if __name__ == '__main__':
    # define cell
    cell = Ebner2019AChDACell(name="cell")
    filepath = os.path.join(path, "..",
                            "commons/morphologies/swc/my.swc")
    cell.load_morpho(filepath=filepath)

    # make NetStim stims
    ns_cell = NetStimCell("netstim_cell")
    stim1 = ns_cell.make_netstim(start=WARMUP + 1, number=1)

    # make VecStim
    vs_cell = VecStimCell("vecstim_cell")
    stim2 = vs_cell.make_vecstim(np.array([WARMUP+50]))

    # make synapses with spines
    syns_4p, heads = cell.add_synapses_with_spine(source=None, secs=cell.secs, number=100, netcon_weight=WEIGHT,
                                                  mod_name="Syn4PAChDa", delay=1, **cell.params_4p_syn)
    for s, h in zip(syns_4p, heads):
        syn_ach = cell.add_synapse(source=stim1, mod_name="SynACh", seg=h(1.0), netcon_weight=0.1, delay=1)
        syn_da = cell.add_synapse(source=stim2, mod_name="SynDa", seg=h(1.0), netcon_weight=0.1, delay=1)
        cell.set_synaptic_pointers(s, syn_ach, syn_da)

    # add mechanisms
    cell.make_default_mechanisms()
Beispiel #2
0
from neuronpp.utils.record import Record
from neuronpp.utils.iclamp import IClamp
from neuronpp.utils.utils import make_shape_plot
from neuronpp.core.cells.netstim_cell import NetStimCell

# Create cell
cell = Cell(name="cell")
path = os.path.dirname(os.path.abspath(__file__))
morpho_path = os.path.join(path, "..", "commons/morphologies/asc/cell2.asc")
cell.load_morpho(filepath=morpho_path)
cell.insert("pas")
cell.insert("hh")

# Create stim and synapses
ns_cell = NetStimCell("stim_cell")
ns = ns_cell.make_netstim(start=30, number=5, interval=10)

syns = cell.add_synapses_with_spine(source=ns,
                                    secs=cell.filter_secs("apic"),
                                    mod_name="ExpSyn",
                                    netcon_weight=0.01,
                                    delay=1,
                                    number=100)
soma = cell.filter_secs("soma")

# Create IClamp
ic = IClamp(segment=soma(0.5))
ic.stim(delay=100, dur=10, amp=0.1)

# prepare plots and spike detector
rec_v = Record(soma(0.5), variables="v")
Beispiel #3
0
path = os.path.dirname(os.path.abspath(__file__))
model_path1 = os.path.join(path, "..", "commons/mods/ebner2019")
model_path2 = os.path.join(path, "..", "commons/morphologies/swc/my.swc")

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