Exemplo n.º 1
0
def setup_model(root='/', hsolve=True):
    moose.ce(root)
    model = moose.Neutral('model')
    data = moose.Neutral('data')
    cell = DeepBasket('%s/deepbasket' % (model.path))
    soma = moose.Compartment('%s/comp_1' % (cell.path))
    if hsolve:
        solver = moose.HSolve('%s/solve' % (cell.path))
        solver.dt = simdt
        solver.target = cell.path
    pulse = moose.PulseGen('%s/stimulus' % (model.path))
    moose.connect(pulse, 'output', soma, 'injectMsg')
    tab_vm = moose.Table('%s/spinystellate_soma_Vm' % (data.path))
    moose.connect(tab_vm, 'requestOut', soma, 'getVm')
    tab_stim = moose.Table('%s/spinystellate_soma_inject' % (data.path))
    moose.connect(tab_stim, 'requestOut', pulse, 'getOutputValue')
    utils.setDefaultDt(elecdt=simdt, plotdt2=plotdt)
    utils.assignDefaultTicks(model, data)
    return {'stimulus': pulse, 'tab_vm': tab_vm, 'tab_stim': tab_stim}
Exemplo n.º 2
0
def setup_model(root="/", hsolve=True):
    moose.ce(root)
    model = moose.Neutral("model")
    data = moose.Neutral("data")
    cell = DeepBasket("%s/deepbasket" % (model.path))
    soma = moose.Compartment("%s/comp_1" % (cell.path))
    if hsolve:
        solver = moose.HSolve("%s/solve" % (cell.path))
        solver.dt = simdt
        solver.target = cell.path
    pulse = moose.PulseGen("%s/stimulus" % (model.path))
    moose.connect(pulse, "output", soma, "injectMsg")
    tab_vm = moose.Table("%s/spinystellate_soma_Vm" % (data.path))
    moose.connect(tab_vm, "requestOut", soma, "getVm")
    tab_stim = moose.Table("%s/spinystellate_soma_inject" % (data.path))
    moose.connect(tab_stim, "requestOut", pulse, "getOutputValue")
    utils.setDefaultDt(elecdt=simdt, plotdt2=plotdt)
    utils.assignDefaultTicks(model, data)
    return {"stimulus": pulse, "tab_vm": tab_vm, "tab_stim": tab_stim}
Exemplo n.º 3
0
def setup_model(root='/', hsolve=True):
    moose.ce(root)
    model = moose.Neutral('model')
    data = moose.Neutral('data')
    cell = SpinyStellate('%s/spinystellate' % (model.path))
    soma = moose.Compartment('%s/comp_1' % (cell.path))
    if hsolve:
        solver = moose.HSolve('%s/solve' % (cell.path))
        solver.dt = simdt
        solver.target = cell.path
    pulse = moose.PulseGen('%s/stimulus' % (model.path))
    moose.connect(pulse, 'output', soma, 'injectMsg')
    tab_vm = moose.Table('%s/spinystellate_soma_Vm' % (data.path))
    moose.connect(tab_vm, 'requestOut', soma, 'getVm')
    tab_stim = moose.Table('%s/spinystellate_soma_inject' % (data.path))
    moose.connect(tab_stim, 'requestOut', pulse, 'getOutputValue')
    utils.setDefaultDt(elecdt=simdt, plotdt2=plotdt)
    utils.assignDefaultTicks(model, data)
    return {'stimulus': pulse,
            'tab_vm': tab_vm,
            'tab_stim': tab_stim}
Exemplo n.º 4
0
soma = moose.Compartment('soma')
soma = moose.element('soma')  # Returns a refence to an existant moose element.
# Doesn't create new moose element.!!!

neuron = moose.Neutral('/neuron')
soma = moose.Compartment('/neuron/soma')
dend = moose.Compartment('/neuron/dend')
data = moose.Neutral('/data')

print soma.path
print soma.name

# List elements under a moose element.
moose.le('/neuron')

# List all the attributes of a moose element.
moose.showfield('/neuron')

# Print individual attributes of moose elements to examine.
print soma.Rm, soma.Vm, soma.Cm, soma.Ra

# Allows moose to traverse into moose element to short showfield command.
moose.ce('/neuron')  # Change head node element for traversal.
moose.ce(neuron)
moose.ce()  # Change the head node to root node.

soma.Cm = 1e-9
soma.Rm = 10e6
soma.initVm = -75E-3