Cable cells

class arbor.cable_cell

A cable cell is constructed from a morphology, a label dictionary and a decor.


The regions and locsets defined in the label dictionary are thingified when the cable cell is constructed, and an exception will be thrown if an invalid label expression is found.

There are two reasons an expression might be invalid:

  1. Explicit reference to a location of cable that does not exist in the morphology, for example (branch 12) on a cell with 6 branches.

  2. Reference to an incorrect label: circular reference, or a label that does not exist.

import arbor

# Construct the morphology from an SWC file.
tree = arbor.load_swc_arbor('granule.swc')
morph = arbor.morphology(tree)

# Define regions using standard SWC tags
labels = arbor.label_dict({'soma': '(tag 1)',
                           'axon': '(tag 2)',
                           'dend': '(join (tag 3) (tag 4))'})

# Define decorations
decor = arbor.decor()
decor.paint('"dend"', arbor.density('pas'))
decor.paint('"axon"', arbor.density('hh'))
decor.paint('"soma"', arbor.density('hh'))

# Construct a cable cell.
cell = arbor.cable_cell(morph, labels, decor)
__init__(morphology, labels, decorations)


  • morphology (morphology) – the morphology of the cell

  • labels (label_dict) – dictionary of labeled regions and locsets

  • decorations (decor) – the decorations on the cell


Returns the range of local indexes assigned to a placement in the decorations as a tuple of two integers, that define the range of indexes as a half open interval.


index (int) – the unique index of the placement.

Return type

tuple(int, int)

class arbor.ion

properties of an ionic species.