Section class¶
(Shortest import: from brian2 import Section)

class
brian2.spatialneuron.morphology.
Section
(**kwds)[source]¶ Bases:
brian2.spatialneuron.morphology.Morphology
A section (unbranched structure), described as a sequence of truncated cones with potentially varying diameters and lengths per compartment.
Parameters: diameter :
Quantity
Either a single value (the constant diameter along the whole section), or a value of length
n+1
. Whenn+1
values are given, they will be interpreted as the diameters at the start of the first compartment and the diameters at the end of each compartment (which is equivalent to: the diameter at the start of each compartment and the diameter at the end of the last compartment.n : int, optional
The number of compartments in this section. Defaults to 1.
length :
Quantity
, optionalEither a single value (the total length of the section), or a value of length
n
, the length of each individual compartment. Cannot be combined with the specification of coordinates.x :
Quantity
, optionaln+1
values, specifying the x coordinates of the start point of the first compartment and the endpoints of all compartments (which is equivalent to: the start point of all compartments and the end point of the last compartment). The coordinates are interpreted as relative to the end point of the parent compartment (if any), so in most cases the start point should be0*um
. The common exception is a cylinder connecting to aSoma
, here the start point can be used to make the cylinder start at the surface of the sphere instead of at its center. You can specify all ofx
,y
, orz
to specify a morphology in 3D, or only one or two out of them to specify a morphology in 1D or 2D.y :
Quantity
, optionalSee
x
z :
Quantity
, optionalSee
x
type : str, optional
The type (e.g.
"axon"
) of thisSection
.Attributes
area
The membrane surface area of each compartment in this section. diameter
The diameter at the middle of each compartment in this section. distance
The total distance between the midpoint of each compartment and the root of the morphology. end_diameter
The diameter at the end of each compartment in this section. end_distance
The distance to the root of the morphology at the end of this section. end_x_
The x coordinate (as a unitless floating point number) at the end of each compartment. end_y_
The y coordinate (as a unitless floating point number) at the end of each compartment. end_z_
The z coordinate (as a unitless floating point number) at the end of each compartment. length
The length of each compartment in this section. r_length_1
The geometrydependent term to calculate the conductance between the start and the midpoint of each compartment. r_length_2
The geometrydependent term to calculate the conductance between the midpoint and the end of each compartment. start_diameter
The diameter at the start of each compartment in this section. start_x_
The x coordinate (as a unitless floating point number) at the beginning of each compartment. start_y_
The y coordinate (as a unitless floating point number) at the beginning of each compartment. start_z_
The z coordinate (as a unitless floating point number) at the beginning of each compartment. volume
The volume of each compartment in this section. x_
The x coordinate (as a unitless floating point number) at the midpoint of each compartment. y_
The y coordinate (as a unitless floating point number) at the midpoint of each compartment. z_
The z coordinate (as a unitless floating point number) at the midpoint of each compartment. Methods
copy_section
()Create a copy of the current section (attributes of this section only, not recreating the parent/children relation) Details

area
¶ The membrane surface area of each compartment in this section. The surface area of each compartment is calculated as \(\frac{\pi}{2}(d_1 + d_2)\sqrt{\frac{(d_1  d_2)^2}{4} + l^2)}\), where \(l\) is the length of the compartment, and \(d_1\) and \(d_2\) are the diameter at the start and end of the compartment, respectively. Note that this surface area does not contain the area of the two disks at the two sides of the truncated cone.

diameter
¶ The diameter at the middle of each compartment in this section.

distance
¶ The total distance between the midpoint of each compartment and the root of the morphology.

end_diameter
¶ The diameter at the end of each compartment in this section.

end_distance
¶ The distance to the root of the morphology at the end of this section.

end_x_
¶ The x coordinate (as a unitless floating point number) at the end of each compartment. Returns
None
for morphologies without coordinates.

end_y_
¶ The y coordinate (as a unitless floating point number) at the end of each compartment. Returns
None
for morphologies without coordinates.

end_z_
¶ The z coordinate (as a unitless floating point number) at the end of each compartment. Returns
None
for morphologies without coordinates.

length
¶ The length of each compartment in this section.

r_length_1
¶ The geometrydependent term to calculate the conductance between the start and the midpoint of each compartment. Dividing this value by the Intracellular resistivity gives the conductance.

r_length_2
¶ The geometrydependent term to calculate the conductance between the midpoint and the end of each compartment. Dividing this value by the Intracellular resistivity gives the conductance.

start_diameter
¶ The diameter at the start of each compartment in this section.

start_x_
¶ The x coordinate (as a unitless floating point number) at the beginning of each compartment. Returns
None
for morphologies without coordinates.

start_y_
¶ The y coordinate (as a unitless floating point number) at the beginning of each compartment. Returns
None
for morphologies without coordinates.

start_z_
¶ The z coordinate (as a unitless floating point number) at the beginning of each compartment. Returns
None
for morphologies without coordinates.

volume
¶ The volume of each compartment in this section. The volume of each compartment is calculated as \(\frac{\pi}{12} l (d_1^2 + d_1 d_2 + d_2^2)\), where \(l\) is the length of the compartment, and \(d_1\) and \(d_2\) are the diameter at the start and end of the compartment, respectively.

x_
¶ The x coordinate (as a unitless floating point number) at the midpoint of each compartment. Returns
None
for morphologies without coordinates.

y_
¶ The y coordinate (as a unitless floating point number) at the midpoint of each compartment. Returns
None
for morphologies without coordinates.

z_
¶ The z coordinate (as a unitless floating point number) at the midpoint of each compartment. Returns
None
for morphologies without coordinates.

copy_section
()[source]¶ Create a copy of the current section (attributes of this section only, not recreating the parent/children relation)
Returns: copy :
Morphology
A copy of this section (without the links to the parent/children)

Tutorials and examples using this¶
 Example frompapers/Brette_2012/Fig4