# Soma class

(Shortest import: `from brian2 import Soma)`

class brian2.spatialneuron.morphology.Soma(**kwds)

  Bases: `Morphology`

  A spherical, iso-potential soma.

  Parameters:

    diameter : `Quantity`

    > Diameter of the sphere.

    x : `Quantity`, optional

    > The x coordinate of the position of the soma.

    y : `Quantity`, optional

    > The y coordinate of the position of the soma.

    z : `Quantity`, optional

    > The z coordinate of the position of the soma.

    type : str, optional

    > The `type` of this section, defaults to `'soma'`.

  Attributes

  `area` | The membrane surface area of this section (as an array of length 1).
  `diameter` | The diameter of this section (as an array of length 1).
  `distance` | The total distance between the midpoint of this section and the root of the morphology.
  `end_distance` | The distance to the root of the morphology at the end of this section.
  `end_x_` | The x-coordinate of the current section (as an array of length 1).
  `end_y_` | The y-coordinate of the current section (as an array of length 1).
  `end_z_` | The z-coordinate of the current section (as an array of length 1).
  `length` | The "length" (equal to `diameter`) of this section (as an array of length 1).
  `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_x_` | The x-coordinate of the current section (as an array of length 1).
  `start_y_` | The y-coordinate of the current section (as an array of length 1).
  `start_z_` | The z-coordinate of the current section (as an array of length 1).
  `volume` | The volume of this section (as an array of length 1).
  `x_` | The x-coordinate of the current section (as an array of length 1).
  `y_` | The y-coordinate of the current section (as an array of length 1).
  `z_` | The z-coordinate of the current section (as an array of length 1).

  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 this section (as an array of length 1).

  diameter

    The diameter of this section (as an array of length 1).

  distance

    The total distance between the midpoint of this section and the root of the morphology. The `Soma` is most likely the root of the morphology, and therefore the `distance` is 0.

  end_distance

    The distance to the root of the morphology at the end of this section. Note that since a `Soma` is modeled as a point (see docs of `x`, etc.), it does not add anything to the total distance, e.g. a section connecting to a `Soma` has a `distance` of 0 um at its start.

  end_x_

    The x-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  end_y_

    The y-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  end_z_

    The z-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  length

    The “length” (equal to `diameter`) of this section (as an array of length 1).

  r_length_1

    The geometry-dependent term to calculate the conductance between the start and the midpoint of each compartment. Returns a fixed (high) value for a `Soma`, corresponding to a section with very low intracellular resistance.

  r_length_2

    The geometry-dependent term to calculate the conductance between the midpoint and the end of each compartment. Returns a fixed (high) value for a `Soma`, corresponding to a section with very low intracellular resistance.

  start_x_

    The x-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  start_y_

    The y-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  start_z_

    The z-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  volume

    The volume of this section (as an array of length 1).

  x_

    The x-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  y_

    The y-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  z_

    The z-coordinate of the current section (as an array of length 1). Note that a `Soma` is modelled as a “point” with finite surface/volume, equivalent to that of a sphere with the given `diameter`. It’s start-, midpoint-, and end-coordinates are therefore identical.

  copy_section()

    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

- Example compartmental/bipolar_cell

- Example compartmental/bipolar_with_inputs

- Example compartmental/bipolar_with_inputs2

- Example compartmental/morphotest

- Example compartmental/spike_initiation

- Example frompapers/Brette_2012/Fig1

- Example frompapers/Brette_2012/Fig3AB

- Example frompapers/Brette_2012/Fig3CF

- Example frompapers/Brette_2012/Fig4

- Example frompapers/Brette_2012/Fig5A