pt3dadd in python

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
anna

pt3dadd in python

Post by anna »

Hello,
I'm willing to add 3d points to define sections. I'm working under python 2.5 (with neuron as a module), and I tried the following: my_section = h.pt3dadd(x,y,z,d), but it didn't seem to work. (couldn't get any shape plot after that: "No accessed section...")
All other syntaxes I tried out led to an error message during execution... Unfortunately, this is a problem I cannot circumvent...
Could someone please help me with the syntax?
Thanks a lot!
hines
Site Admin
Posts: 1682
Joined: Wed May 18, 2005 3:32 pm

Re: pt3dadd in python

Post by hines »

try

h.pt3dadd(x,y,z,d, sec=my_section)

or if you are doing many points at once, you could factor out the section push/pop with
my_section.push()
#loop over points to be in the section with h.pt3dadd(x,y,z,d)
h.pop_section()
anna

Re: pt3dadd in python

Post by anna »

now it works fine, thank you very much!
Post Reply