I have a model whose topology is a ball (soma) and several sticks (dendrites). I use the impedance class in order to calculate the electrotonic distance of each dendritic segment from the soma using the following code:
- Code: Select all
finitialize(-65)
zz = new Impedance()
soma { zz.loc(0.5) }
zz.compute($1, 1)
zn = 0
soma { zn = zz.input(0.5) }
forsec "den" {
for (x,0) {
ElectroDist_info(x) = -log(zz.transfer(x)/zn)
}
}
I use this code to iterate over each dendritic section and compute the electrotonic distance. The code works pretty well; however, I found that some dendritic segments have infinity electrotonic distance because the zz.transfer(x) gives infinity. Any idea what would cause that?
