http://neuron.yale.edu/neuron/static/do ... tick1.html
1. I often go into this libnrnoc error: "Python quit unexpectedly while using the libnrnoc.0.dylib plug-in."
when I run
Code: Select all
dend.connect(soma(1))
Code: Select all
import sys
sys.path.append('/Applications/NEURON-7.3/nrn/lib/python')
from neuron import h, gui
soma = h.Section(name = 'soma')
dend = h.Section(name = 'dend')
dend.connect(soma(1))
Code: Select all
asyn = h.AlphaSynapse(soma(0.5))
Code: Select all
stim = h.IClamp(dend(1))
2. In the third tutorial, the following codes rotate the cells but I don't know how it is achieved mathematically.
Code: Select all
def rotateZ(self, theta):
"""Rotate the cell about the Z axis."""
for sec in self.all:
for i in range(2):
x = h.x3d(i) * sin(theta) + h.y3d(i) * cos(theta)
y = h.x3d(i) * cos(theta) + h.y3d(i) * -sin(theta)
h.pt3dchange(i, x, y, h.z3d(i), h.diam3d(i))