Cable cells

class arbor.decor

A decor object contains a description of the cell dynamics, to be applied to a morphology when used to instantiate a cable_cell

__init__()

Construct an empty decor description.

Properties for which defaults can be defined over the entire cell, specifically cable properties and ion properties, are set with set_property and set_ion methods.

set_property(Vm=None, cm=None, rL=None, tempK=None)

Set default values of cable properties on the whole cell. Overrides the default global values, and can be overridden by painting the values onto regions.

Parameters
  • region (str) – description of the region.

  • Vm (float or None) – Initial membrane voltage [mV].

  • cm (float or None) – Membrane capacitance [F/m²].

  • rL (float or None) – Axial resistivity of cable [Ω·cm].

  • tempK (float or None) – Temperature [Kelvin].

# Set cell-wide values for properties for resistivity and capacitance
decor.set_property(rL=100, cm=0.1)
set_ion(ion, int_con=None, ext_con=None, rev_pot=None, method=None)

Set default value for one or more properties of a specific ion on the whole cell. Set the properties of ion species named ion that will be applied by default everywhere on the cell. Species concentrations and reversal potential can be overridden on specific regions using the paint interface, while the method for calculating reversal potential is global for all CVs in the cell, and can’t be overriden locally.

Parameters
  • ion (str) – description of the ion species.

  • int_con (float or None.) – initial internal concentration [mM].

  • ext_con (float or None.) – initial external concentration [mM].

  • rev_pot (float or None) – reversal potential [mV].

  • method (mechanism or None) – method for calculating reversal potential.

# Set nernst reversal potential method for calcium.
decor.set_ion('ca', method=mech('nernst/x=ca'))

# Set reversal potential and concentration for sodium.
# The reversal potential is fixed, so we set the method to None.
decor.set_ion('na', int_con=5.0, rev_pot=70, method=None)

Verious specialisations of the paint method are available for setting properties and mechanisms that are applied to regions.

paint(region, Vm=None, cm=None, rL=None, tempK=None)

Set cable properties on a region.

Parameters
  • region (str) – description of the region.

  • Vm (float or None) – Initial membrane voltage [mV].

  • cm (float or None) – Membrane capacitance [F/m²].

  • rL (float or None) – Axial resistivity of cable [Ω·cm].

  • tempK (float or None) – Temperature [Kelvin].

# Specialize resistivity on soma
decor.paint('"soma"', rL=100)
# Specialize resistivity and capacitance on the axon, where
# axon is defined using a region expression.
decor.paint('(tag 2)', cm=0.05, rL=80)
paint(region, name, int_con=None, ext_con=None, rev_pot=None)

Set ion species properties initial conditions on a region.

Parameters
  • name (str) – name of the ion species.

  • int_con (float or None.) – initial internal concentration [mM].

  • ext_con (float or None.) – initial external concentration [mM].

  • rev_pot (float or None) – reversal potential [mV].

paint(region, mechanism)

Apply a mechanism with a region. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • region (str) – description of the region.

  • mechanism (mechanism) – the mechanism.

paint(region, mech_name)

Apply a mechanism with a region using the name of the mechanism. The mechanism will use the parameter values set in the mechanism catalogue. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • region (str) – description of the region.

  • mechanism (str) – the name of the mechanism.

place(locations, const arb::mechanism_desc& d)

Place one instance of synapse described by mechanism to each location in locations. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • locations (str) – description of the locset.

  • mechanism (str) – the name of the mechanism.

Return type

int

place(locations, mechanism)

Place one instance of synapse described by mechanism to each location in locations. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • locations (str) – description of the locset.

  • mechanism (mechanism) – the mechanism.

Return type

int

place(locations, site)

Place one gap junction site at each location in locations. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • locations (str) – description of the locset.

  • site (gap_junction_site) – indicates a gap junction site..

Return type

int

place(locations, stim)

Add a current stimulus at each location in locations. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • locations (str) – description of the locset.

  • stim (i_clamp) – the current stim.

Return type

int

place(locations, d)

Add a voltage spike detector at each location in locations. Returns a unique identifier that can be used to query the local indexes (see index) assigned to the placed items on the cable cell.

Parameters
  • locations (str) – description of the locset.

  • d (threshold_detector) – description of the detector.

Return type

int

discretization(policy)

Set the cv_policy used to discretise the cell into control volumes for simulation.

Parameters

policy (cv_policy) – The cv_policy.

class arbor.cable_cell

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

Note

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"', 'pas')
decor.paint('"axon"', 'hh')
decor.paint('"soma"', 'hh')

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

Constructor.

Parameters
  • morphology (morphology) – the morphology of the cell

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

  • decorations (decor) – the decorations on the cell

placed_lid_range(index)

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.

Parameters

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

Return type

tuple(int, int)

class arbor.ion

properties of an ionic species.

Cable cell probes

Cable cell probe addresses are defined analagously to their counterparts in the C++ API (see 5. Probes for details). Sample data recorded by the Arbor simulation object is returned in the form of a NumPy array, with the first column holding sample times, and subsequent columns holding the corresponding scalar- or vector-valued sample.

Location expressions will be realised as zero or more specific sites on a cell; probe addresses defined over location expressions will describe zero, one, or more probes, one per site. They are evaluated in the context of the cell on which the probe is attached.

Each of the functions described below generates an opaque probe object for use in the recipe get_probes() method.

More information on probes, probe metadata, and sampling can be found in the documentation for the class simulation.

Membrane voltage
arbor.cable_probe_membrane_voltage(where)

Cell membrane potential (mV) at the sites specified by the location expression string where. This value is spatially interpolated.

Metadata: the explicit location of the sample site.

arbor.cable_probe_membrane_voltage_cell()

Cell membrane potential (mV) associated with each cable in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Axial current
arbor.cable_probe_axial_current(where)

Estimation of intracellular current (nA) in the distal direction at the sites specified by the location expression string where.

Metadata: the explicit location of the sample site.

Ionic current
arbor.cable_probe_ion_current_density(where, ion)

Transmembrane current density (A/m²) associated with the given ion at sites specified by the location expression string where.

Metadata: the explicit location of the sample site.

arbor.cable_probe_ion_current_cell(ion)

Transmembrane current (nA) associated with the given ion across each cable in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Total ionic current
arbor.cable_probe_total_ion_current_density(where)

Transmembrane current density (A/m²) _excluding_ capacitive currents at the sites specified by the location expression string where.

Metadata: the explicit location of the sample site.

arbor.cable_probe_total_ion_current_cell()

Transmembrane current (nA) _excluding_ capacitive currents across each cable in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Total transmembrane current
arbor.cable_probe_total_current_cell()

Transmembrane current (nA) _including_ capacitive currents across each cable in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Density mechanism state variable
arbor.cable_probe_density_state(where, mechanism, state)

The value of the state variable state in the density mechanism mechanism at the sites specified by the location expression where.

Metadata: the explicit location of the sample site.

arbor.cable_probe_density_state_cell(mechanism, state)

The value of the state variable state in the density mechanism mechanism on each cable in each CV of the cell discretixation.

Metadata: the list of corresponding cable objects.

Point process state variable
arbor.cable_probe_point_state(target, mechanism, state)

The value of the state variable state in the point process mechanism associated with the target index target on the cell. If the given mechanism is not associated with the target index, no probe will be generated.

Metadata: an object of type cable_point_probe_info, comprising three fields:

  • target: target index on the cell;

  • multiplicity: number of targets sharing the same state in the discretization;

  • location: location object corresponding to the target site.

arbor.cable_probe_point_state_cell(mechanism, state)

The value of the state variable state in the point process mechanism at each of the targets where that mechanism is defined.

Metadata: a list of cable_point_probe_info values, one for each matching target.

Ionic internal concentration
arbor.cable_probe_ion_int_concentration(where, ion)

Ionic internal concentration (mmol/L) of the given ion at the sites specified by the location expression string where.

Metadata: the explicit location of the sample site.

arbor.cable_probe_ion_int_concentration_cell(ion)

Ionic internal concentration (mmol/L) of the given ion in each able in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Ionic external concentration
arbor.cable_probe_ion_ext_concentration(where, ion)

Ionic external concentration (mmol/L) of the given ion at the sites specified by the location expression string where.

Metadata: the explicit location of the sample site.

arbor.cable_probe_ion_ext_concentration_cell(ion)

Ionic external concentration (mmol/L) of the given ion in each able in each CV of the cell discretization.

Metadata: the list of corresponding cable objects.

Discretisation and CV policies

The set of boundary points used by the simulator is determined by a CV policy. These are objects of type cv_policy, which has the following public methods:

class arbor.cv_policy
domain

A read only string expression describing the subset of a cell morphology (region) on which this policy has been declared.

CV policies can be composed with + and | operators.

# The plus operator applies
policy = arbor.cv_policy_single('"soma"') + cv_policy('"dend"')

# The | operator uses CVs of length 10 μm everywhere, except
# on the soma, to which a single CV policy is applied.
policy = arbor.cv_policy_max_extent(10) | cv_policy_single('"soma"')

Specific CV policy objects are created by functions described below. These all take a region parameter that restrict the domain of applicability of that policy; this facility is useful for specifying differing discretisations on different parts of a cell morphology. When a CV policy is constrained in this manner, the boundary of the domain will always constitute part of the CV boundary point set.

arbor.cv_policy_single(domain='(all)')

Use one CV for the whole cell, or one for each connected component of the supplied domain.

# Use one CV for the entire cell (a single compartment model)
single_comp = arbor.cv_policy_single()

# Use a single CV for the soma.
single_comp_soma = arbor.cv_policy_single('"soma"')
Parameters

domain (str) – The region on which the policy is applied.

arbor.cv_policy_every_segment(domain='(all)')

Use every sample point in the morphology definition as a CV boundary, optionally restricted to the supplied domain. Each fork point in the domain is represented by a trivial CV.

Parameters

domain (str) – The region on which the policy is applied.

arbor.cv_policy_fixed_per_branch(cv_per_branch, domain='(all)')

For each branch in each connected component of the domain (or the whole cell, if no domain is given), evenly distribute boundary points along the branch so as to produce exactly cv_per_branch CVs.

Parameters
  • cv_per_branch (int) – The number of CVs per branch.

  • domain (str) – The region on which the policy is applied.

arbor.cv_policy_max_extent(max_extent, domain='(all)')

As for cv_policy_fixed_per_branch(), save that the number of CVs on any given branch will be chosen to be the smallest number that ensures no CV will have an extent on the branch longer than max_extent micrometres.

Parameters
  • max_etent (float) – The maximum length for generated CVs.

  • domain (str) – The region on which the policy is applied.