示例#1
0
Zebrafish MN 
NeuroMorpho.Org ID : 		NMO_09365

'''

from netpyne.support import morphology
from netpyne import sim
from neuron import h
import matplotlib.pyplot as plt
from mpl_toolkits import mplot3d
import platform
import neuron as nrn

#load cell as mycell
#def getmorph(self):
myCell = morphology.Cell()
morphology.load(filename=os.path.join(wdir, 'MN3_morphology.swc'), cell=myCell)

#plot loaded cell
fig = plt.figure()
ax = plt.axes(projection='3d')
morphology.shapeplot(h, ax, color='r')

#get the sections from the cell
secs = list(h.allsec())
secs_all = secs
soma = []
axon = []
dend = []

#get the sections fro soma, axon and dend
示例#2
0
sys.path.append('/Applications/NEURON-7.7/nrn/lib/python')
import os
wdir = os.getcwd()

from netpyne.support import morphology
from netpyne import sim
from neuron import h
import matplotlib.pyplot as plt
import matplotlib.cm
from mpl_toolkits import mplot3d
import platform
import neuron as nrn

#load cell as mycell
#    def getmorph(self):
myCell_1 = morphology.Cell()
morphology.load(filename=os.path.join(wdir, 'MN1_morphology.swc'),
                cell=myCell_1)

cell1_secs = list(h.allsec())

lenght_1 = len(cell1_secs)

myCell_2 = morphology.Cell()
morphology.load(filename=os.path.join(wdir, 'MN2_morphology.swc'),
                cell=myCell_2)

cell2_secs = list(h.allsec())
del cell2_secs[0:lenght_1]

lenght_2 = len(cell2_secs)