import swc file for network simulation
Posted: Fri May 20, 2016 5:24 am
I have a neuron model in python that works great for single cell simulations.
An swc file is used for importing the morphology:
################################################
Import = h.Import3d_SWC_read()
Import.input('morphology.swc')
imprt = h.Import3d_GUI(Import, 0)
imprt.instantiate(None)
################################################
Other than that the model is similar to the ballandstick model in this tutorial:
http://neuron.yale.edu/neuron/static/do ... tick3.html
My problem is that I can do single cell simulations but when I create multiple cells from the class I can only record from the latest created neuron or else:
#############################################################
Assertion failed: file cabcode.c, line 1455
NEURON: n >= 0.
near line 0
{axon { pt3dadd(0, 66, -3, 1) }}
^
*** longjmp causes uninitialized stack frame ***: /usr/bin/python terminated
######################################################
So I read that if I want to do network-simulations I should not use imprt.instantiate(None) but instead imprt.cbexport(None),
http://www.neuron.yale.edu/phpbb/viewto ... =swc+files
however that does not work either. None of the compartments, e.g. soma, can be found.
Question 1. How is it possible to import a swc file and create a network simulation using only python?
Question 2. Is it possible to automatically convert an swc file into python code of "h.pt3dadd" , "self.dend.connect" etc?
An swc file is used for importing the morphology:
################################################
Import = h.Import3d_SWC_read()
Import.input('morphology.swc')
imprt = h.Import3d_GUI(Import, 0)
imprt.instantiate(None)
################################################
Other than that the model is similar to the ballandstick model in this tutorial:
http://neuron.yale.edu/neuron/static/do ... tick3.html
My problem is that I can do single cell simulations but when I create multiple cells from the class I can only record from the latest created neuron or else:
#############################################################
Assertion failed: file cabcode.c, line 1455
NEURON: n >= 0.
near line 0
{axon { pt3dadd(0, 66, -3, 1) }}
^
*** longjmp causes uninitialized stack frame ***: /usr/bin/python terminated
######################################################
So I read that if I want to do network-simulations I should not use imprt.instantiate(None) but instead imprt.cbexport(None),
http://www.neuron.yale.edu/phpbb/viewto ... =swc+files
however that does not work either. None of the compartments, e.g. soma, can be found.
Question 1. How is it possible to import a swc file and create a network simulation using only python?
Question 2. Is it possible to automatically convert an swc file into python code of "h.pt3dadd" , "self.dend.connect" etc?