Neuron+Python+Gui
Posted: Wed Jun 16, 2010 4:37 pm
If I create a section in python:
"python"
and then create a Voltage axis graph, "Plot what?" doesn't list any sections.
I get an even stranger response when I launch "nrngui -python". "Plot what?" displays a really messed up picture, which appears to be empty.
I have tried to fix this by giving the section a name:
To no avail.
The following method does work:
I don't know how hard this is to fix. This might be confusing to those new to Neuron+Python.
On a related note, the "Distributed Mechanisms" menu item does list sections created via the "soma = h.Section(name='soma')" method. However, when I try to access them, I get:
I am not sure if this is a related bug.
As always, thanks for all the work on Neuron!
"python"
Code: Select all
from neuron import h,gui
soma = h.Section()
dend = h.Section()
I get an even stranger response when I launch "nrngui -python". "Plot what?" displays a really messed up picture, which appears to be empty.
I have tried to fix this by giving the section a name:
Code: Select all
from neuron import h,gui
soma = h.Section(name='soma')
print soma.name()
The following method does work:
Code: Select all
from neuron import h,gui
h('create soma')
soma = h.soma
On a related note, the "Distributed Mechanisms" menu item does list sections created via the "soma = h.Section(name='soma')" method. However, when I try to access them, I get:
Code: Select all
NEURON: syntax error
near line 2
{.L}
^
nrnsecmenu(-1, 1)
MenuExplore[0].execute("nrnsecmenu(-1,1)")
MenuExplore[0].make_menu()
doNotify()
Exception in thread Thread-1:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/threading.py", line 525, in __bootstrap_inner
self.run()
File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/neuron/gui.py", line 36, in run
self.fun()
File "/Library/Frameworks/Python.framework/Versions/6.1/lib/python2.6/site-packages/neuron/gui.py", line 17, in process_events
h.doNotify()
RuntimeError: hoc error
As always, thanks for all the work on Neuron!