area() function -- stylized method -- 3d-method

Managing anatomically complex model cells with the CellBuilder. Importing morphometric data with NEURON's Import3D tool or Robert Cannon's CVAPP. Where to find detailed morphometric data.
Post Reply
ngreiner
Posts: 9
Joined: Tue Feb 28, 2017 8:12 am

area() function -- stylized method -- 3d-method

Post by ngreiner » Mon Aug 27, 2018 5:58 pm

Hello,

I am encountering a behaviour of the area() function which I don't understand, materialised by the code-example below.

The mentioned behaviour is that when I define the geometry of a section using the 3d-method, the formula `sec(0.5).area()` and `sec.L * sec.diam * h.PI` yield different results.
By contrast, when I define the section geometry using the stylized method, both formula above yield the same result.

Here is the code-example:

Code: Select all

from neuron import h

sec1 = h.Section()
h.pt3dadd(0.0, 0.0, 0.0, 60.0, sec=sec1)
h.pt3dadd(7.0, 0.0, 0.0, 10.0, sec=sec1)
print 'sec1 L: ', sec1.L
print 'sec1 diam: ', sec1.diam
print 'sec1 cust. area: ', sec1.L * sec1.diam * h.PI
print 'sec1 neuron area: ', sec1(0.5).area()
print ''

sec2 = h.Section()
sec2.L = 7.0
sec2.diam = 35.0
print 'sec2 L: ', sec2.L
print 'sec2 diam: ', sec2.diam
print 'sec2 cust. area: ', sec2.L * sec2.diam * h.PI
print 'sec2 neuron area: ', sec2(0.5).area()
which prints the following lines on the terminal
sec1 L: 7.0
sec1 diam: 35.0
sec1 cust. area: 769.690200129
sec1 neuron area: 2854.61711509

sec2 L: 7.0
sec2 diam: 35.0
sec2 cust. area: 769.690200129
sec2 neuron area: 769.690200129
Can anyone explain to me why this is so ?

Which one of the 2 formulae does NEURON use to compute the transmembrane currents ?

Thank you very much in advance for the help,

Nathan

hines
Site Admin
Posts: 1526
Joined: Wed May 18, 2005 3:32 pm

Re: area() function -- stylized method -- 3d-method

Post by hines » Mon Aug 27, 2018 6:41 pm

When there are 3-d points the area of a segment is the sum of all frusta between adjacent 3-d points that intersect the segment. No curvature
effects are taken into account but effects of the sqrt(dradius^2 + darc^2) are taken into account
(notice that if there are two points at the same position
with different diameters, the area contribution is non-zero even though the length between the two points is 0)

ramcdougal
Posts: 141
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Medicine

Re: area() function -- stylized method -- 3d-method

Post by ramcdougal » Mon Aug 27, 2018 9:24 pm

There is some discussion about how segment areas and volumes are calculated at:

https://www.neuron.yale.edu/neuron/stat ... f-geometry

To say what hines said another way: in your first case, you're defining a tapered shape while the second case defines a cylinder.
For the tapered formula, see

http://mathworld.wolfram.com/ConicalFrustum.html

The other thing to keep in mind is that diam only gives you information about the diameter at one point within a segment (the midpoint) but the area and volume depend on potentially many changes in diameter, and you can only determine that by checking the 3d points.

(Thanks to hines for clarifying some of my confusion on this matter.)

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

Re: area() function -- stylized method -- 3d-method

Post by ted » Tue Aug 28, 2018 2:16 am

To return to this question
Which one of the 2 formulae does NEURON use to compute the transmembrane currents ?
NEURON uses the correct surface area, which is the value that area() returns.

ngreiner
Posts: 9
Joined: Tue Feb 28, 2017 8:12 am

Re: area() function -- stylized method -- 3d-method

Post by ngreiner » Tue Aug 28, 2018 4:00 am

Thank you for your replies.

I was puzzled by the value returned by sec(0.5).area() in the case of the 3d-method, but that was because my formula for calculating the side area of a frustum was incorrect. After using the appropriate formula (given at http://mathworld.wolfram.com/ConicalFrustum.html), the result I obtained matched the value returned by sec(0.5).area().

Nathan

Post Reply