Public | Automated Build

Last pushed: 5 months ago
Short Description
Pype9 is a collection of Python pipelines for simulating networks of neuron models described in 9ML
Full Description


.. image::
.. image::
.. image::
:alt: Supported Python versions
.. image::
:alt: Latest Version
.. image::
:alt: Documentation Status

PYthon PipelinEs for 9ML (Pype9) is a collection of Python pipelines
for simulating networks of neuron models described in NineML_ with various
simulator backends.


Supported Simulators

Pype9 works with either or both of the following simulator backends

  • Neuron_ >= 7.5
  • NEST_ >= 2.14.0

Detailed instructions on how to install these simulators on different platforms
can be found in the Installation documentation_.

Unsupported NineML

NineML_ aims to be a comprehensive description language for neural simulation. This
means that it allows the expression of some uncommon configurations that are
difficult to implement in Neuron_ and NEST_. Work is planned to make the NEURON
and NEST pipelines in Pype9 support NineML_ fully, however until then the
following restrictions apply to models that can be used with Pype9.

  • synapses must be linear
  • synapses can only have one variable that varies over a projection (e.g.
  • no recurrent analog connections between populations (e.g. gap junctions)
  • only one event send port per cell
  • names given to NineML_ elements are not escaped and therefore can clash with
    built-in keywords and some PyPe9 method names (e.g. 'lambda' is a reserved
    keyword in Python). Please avoid using names that clash with C++ or Python
    keywords (NB: This will be fixed in future versions).


Given a cell model described in NineML_ saved in
my_hodgkin_huxley.xml, the simulator pipeline can run from the command line:

.. code-block:: bash

$ pype9 simulate my_hodgkin_huxley.xml#hh_props neuron 100.0 0.01 \
--play isyn isyn.neo.pkl --record v v.neo.pkl --init_value v -65.0 mV

or in a Python script

.. code-block:: python

from pype9.simulator.neuron import cell, Simulation
from nineml import units as un

HodgkinHuxley = cell.MetaClass('my_hodgkin_huxley.xml#hh_class')
with Simulation(dt=0.01, seed=1234) as sim:
hh = HodgkinHuxley('my_hodgkin_huxley.xml#hh_props', v=-65.0
hh.record('v') *
v = hh.recording('v')

Pype9 also supports network models described in NineML_ via integration with PyNN_

.. code-block:: bash

$ pype9 simulate brunel.xml nest 1000.0 0.01 \
--record Exc.spike_output Exc-nest.neo.pkl \
--record Inh.spike_output Inh-nest.neo.pkl \
--seed 12345


.. code-block:: python

from pype9.simulator.neuron import Network, Simulation
from nineml import units as un

with Simulation(dt=0.01, seed=1234) as sim:
brunel_ai = Network('brunel.xml#AI')
exc_spikes = brunel_ai.component_array('Exc').recording('spike_output')
inh_spikes = brunel_ai.component_array('Inh').recording('spike_output')

See Creating Simulations in Python_ in the Pype9 docs for more examples and pipelines.

In addition to the simulate command there is also a plot command for
conveniently plotting the results of the simulation with Matplotlib_,
and a convert command to convert NineML_ files between different serialization
formats (XML, YAML, JSON and HDF5) and NineML_ versions (1.0 and 2.0dev). See the
documentation for details.

:copyright: Copyright 20012-2016 by the Pype9 team, see AUTHORS.
:license: MIT, see LICENSE for details.

.. _PyNN:
.. _NeuralEnsemble Google Group:!forum/neuralensemble
.. _Matplotlib:
.. _Creating Simulations in Python:
.. _Installation documentation:
.. _NineML:
.. _NEST:
.. _Neuron:

Docker Pull Command
Source Repository