Python

The Python frontend for Arbor is an interface that the vast majority of users will use to interact with Arbor. This section covers how to use the frontend with examples and detailed descriptions of features.

Note

If you haven’t set up Arbor yet, see the Python installation guide.

Simulation steps

The workflow for defining and running a model defined in Simulations can be performed in Python as follows:

  1. Describe the neuron model by defining an arbor.recipe;

  2. Describe the computational resources to use for simulation using arbor.proc_allocation and arbor.context;

  3. Partition the model over the hardware resources using arbor.partition_load_balance;

  4. Run the model by initiating then running the arbor.simulation.

These details are described and examples are given in the next sections Cells, Recipes, Domain decomposition, Simulations, and Profiler.

Note

Detailed information on Arbor’s Python features can also be obtained with Python’s help function, e.g.

>>> help(arbor.proc_allocation)
Help on class proc_allocation in module arbor:

class proc_allocation(pybind11_builtins.pybind11_object)
|  Enumerates the computational resources on a node to be used for simulation.
|...