Page 1 of 1

pt3dadd in python

Posted: Tue Dec 01, 2009 9:44 am
by anna
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!

Re: pt3dadd in python

Posted: Wed Dec 02, 2009 12:02 pm
by hines

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

Posted: Thu Dec 03, 2009 7:31 am
by anna
now it works fine, thank you very much!