pt3dadd in python

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

Moderator: hines

Post Reply

pt3dadd in python

Post by anna » Tue Dec 01, 2009 9:44 am

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!

Site Admin
Posts: 1596
Joined: Wed May 18, 2005 3:32 pm

Re: pt3dadd in python

Post by hines » Wed Dec 02, 2009 12:02 pm


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
#loop over points to be in the section with h.pt3dadd(x,y,z,d)


Re: pt3dadd in python

Post by anna » Thu Dec 03, 2009 7:31 am

now it works fine, thank you very much!

Post Reply