what is inside seg.x

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

Moderator: hines

Post Reply
stil
Posts: 28
Joined: Thu Jul 01, 2010 8:47 am
Location: Mulhouse - France

what is inside seg.x

Post by stil »

Hello,
I must have misunderstood something about segments. with the following code :

Code: Select all

import neuron
from neuron import h

spine = h.Section()
spine.L = 10
spine.nseg = 10

for seg in spine.allseg():
	print repr(seg.x)
The output is the following :

Code: Select all

0.0
0.050000000000000003
0.15000000000000002
0.25
0.34999999999999998
0.44999999999999996
0.54999999999999993
0.64999999999999991
0.74999999999999989
0.84999999999999987
0.94999999999999984
1.0
I was expecting that seg.x values would range between 0 and 10, why not ?
I already know seg.x, seg.diam, what are the other attributes of seg ?

thanks a lot
ted
Site Admin
Posts: 6393
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: what is inside seg.x

Post by ted »

stil wrote:I was expecting that seg.x values would range between 0 and 10
. . .
I already know seg.x, seg.diam, what are the other attributes of seg ?
Time to learn something about how NEURON deals with the cable equation. Key to that is an understanding of the terms section, segment, and range. Read chapter 5 in The NEURON Book, or if you don't have that, read
Hines & Carnevale "The NEURON Simulation Environment" that was published in Neural Computation (available from a link on the Documentation page http://www.neuron.yale.edu/neuron/docs)
Then re-read the documentation of seg in the Programmer's Reference
http://www.neuron.yale.edu/neuron/stati ... ml#Segment
Post Reply