Page 1 of 1

Getting a NetCon location on a dendrite

Posted: Wed Aug 22, 2018 6:39 pm
by ryang
I'm having trouble with a simple issue. What commands do I need to do to get the location of a NetCon object on a dendrite? Was playing with SectionRef() and couldn't get a parent or child, been stuck on this for a while.

Re: Getting a NetCon location on a dendrite

Posted: Thu Aug 23, 2018 11:28 am
by ted
Read the documentation of the NetCon class in the Programmer's Reference
https://www.neuron.yale.edu/neuron/stat ... index.html

Re: Getting a NetCon location on a dendrite

Posted: Thu Aug 23, 2018 3:28 pm
by ryang
Yes, thank you, I've read that many times. There is a postcell() method but that returns the cell. Am I even doing the right thing here? I want to comfirm that my synapses are in the right location on the dendrite of the cell after I assign them to a NetCon object.

Re: Getting a NetCon location on a dendrite

Posted: Thu Aug 23, 2018 6:54 pm
by ryang
Synapses were in the right place when I used the pointgroupmanager, for some reason I had problems using it before. Still I'd like to be able to verify things in hoc.

Re: Getting a NetCon location on a dendrite

Posted: Thu Aug 23, 2018 10:21 pm
by ted
There is a postcell() method but that returns the cell.
preloc? postloc?

Re: Getting a NetCon location on a dendrite

Posted: Fri Aug 24, 2018 1:50 pm
by ryang
Those return the locatoin on the dendrite but not the dendrite number. Given the following code:

Code: Select all

NetCon[index].postcell
NetCon[index].preloc
NetCon[index].postloc
NetCon[index].syn
the return is:

Code: Select all

	cell_object[0]
	-1 
	0.9516129 
	synapse_receptor_nmodl[0] 
My preloc is a vecstim object, so as expected it returms -1.

Re: Getting a NetCon location on a dendrite

Posted: Fri Aug 24, 2018 3:13 pm
by ted
Documentation of netcon.postloc():
"The section of the target point process is pushed onto the section stack so that it is the currently accessed section . . . pop_section() must be called after you are finished with the section".
So after you call postloc, print the name of the currently accessed section, and that's the section to which the NetCon's target is attached.

What does the documentation for netcon.preloc say, and how would you use that information to discover the name of the presynaptic section?

Re: Getting a NetCon location on a dendrite

Posted: Fri Aug 24, 2018 7:42 pm
by ryang
Okay, thanks for the push, things popped for me a bit. This is where I'm at now:

Code: Select all

print NetCon[index].postcell
{x = NetCon[index].preloc print x, pop_section()}
{x = NetCon[index].postloc print secname(), "( ",x,")"  pop_section()}
print NetCon[index].syn
and it returns

Code: Select all

cell_object[0] 
-1 
cell_object[0].dendrite[3]( 0.9516129 )
synapse_receptor_nmodl[0]
I'm not sure how to get the name of presynaptic section since it's source is an object (an nmodl object to be precise that creates short term depression and is taking in the vectstim object). I get -1 like the documenation says and when I ask for the secname(), I get the return of the cell_object soma. Maybe it will come to me tonight.

Re: Getting a NetCon location on a dendrite

Posted: Sun Aug 26, 2018 4:18 pm
by ted
I'm not sure how to get the name of presynaptic section since its source is an object
There's your answer.