I have used the subthalamic neuron template (by Gillies) and created a separate file for extracellular stimulation of the neuron.
The sections are created in a particular order, so I have attempted to create a seclist to stimulate them in a particular order.
However, the output file has produced zeros only, so I would like to know if you can spot the flaws in my code.
Furthermore, each of the dend sections (i.e. dend[0] and dend[1]) have 5 segments each, and my goal is to apply an extracellular stimulus to
dend[0] segment 1, dend[0] segment 2, dend[0] segment 3... soma, dend[1] segment 1, dend[1] segment 2... etc in this order.
Here is the code:
Code: Select all
objref tvec, pvec, datafile, dummy, m, veclist
nosegs = 11
numpts = 1001
//2 vectors to store time and potential
tvec = new Vector(numpts)
pvec = new Vector(numpts)
//to scan in the datafile
datafile= new File()
datafile.ropen("stnSTIM1.txt") //external stimulus file 1001x1001 elements
m = new Matrix()
m.scanf(datafile)
tvec=m.getcol(0) //column[0] of the matrix is the time vector
//number of sthcells
nsthcells=100
//creation of a seclist that contains all elements in the order they are connected
objref sl
sl = new SectionList()
//does this stimulate all the compartments? 11 in total (5 from dend[0], 1 from soma, 5 from dend[1]
for j=0, nsthcells-1 {
SThcells[j].dend[0] sl.append()
SThcells[j].soma sl.append()
SThcells[j].dend[1] sl.append()
}
//apply the extracellular stimulus each section
ii=0
veclist= new List()
forsec sl{
for (x, 0) {
ii+=1
pvec=m.getcol(ii)
insert extracellular
pvec.play(&e_extracellular(x),tvec)
veclist.append(pvec)
}
print secname()
}
Thank you very much for your help