Cylinder class

(Shortest import: from brian2 import Cylinder)

class brian2.spatialneuron.morphology.Cylinder(**kwds)[source]

Bases: brian2.spatialneuron.morphology.Section

A cylindrical section. For sections with more complex geometry (varying length and/or diameter of each compartment), use the Section class.

Parameters

diameter : Quantity

The diameter of the cylinder.

n : int, optional

The number of compartments in this section. Defaults to 1.

length : Quantity, optional

The length of the cylinder. Cannot be combined with the specification of coordinates.

x : Quantity, optional

A sequence of two values, the start and the end point of the cylinder. The coordinates are interpreted as relative to the end point of the parent compartment (if any), so in most cases the start point should be 0*um. The common exception is a cylinder connecting to a Soma, 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 of x, y, or z to specify a morphology in 3D, or only one or two out of them to specify a morphology in 1D or 2D.

y : Quantity, optional

See x

z : Quantity, optional

See x

type : str, optional

The type (e.g. "axon") of this Cylinder.

Attributes

area

The membrane surface area of each compartment in this section.

diameter

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

end_diameter

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

r_length_1

The geometry-dependent term to calculate the conductance between the start and the midpoint of each compartment.

r_length_2

The geometry-dependent 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.

volume

The volume of each compartment in this section.

Methods

copy_section()

Create a copy of the current section (attributes of this section only, not re-creating 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 \(\pi d l\), where \(l\) is the length of the compartment, and \(d\) is its diameter. Note that this surface area does not contain the area of the two disks at the two sides of the cylinder.

diameter

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

end_diameter

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

r_length_1

The geometry-dependent 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 geometry-dependent 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.

volume

The volume of each compartment in this section. The volume of each compartment is calculated as \(\pi \frac{d}{2}^2 l\) , where \(l\) is the length of the compartment, and \(d\) is its diameter.

copy_section()[source]

Create a copy of the current section (attributes of this section only, not re-creating the parent/children relation)

Returns

copy : Morphology

A copy of this section (without the links to the parent/children)

Tutorials and examples using this