PYthon PipelinEs for 9ML (Pype9) is a collection of Python pipelines for simulating networks of neuron models described in 9ML with various simulator backends.
Project description
PYthon PipelinEs for 9ML (Pype9) is a collection of Python pipelines for simulating networks of neuron models described in NineML with various simulator backends.
Links
Documentation: http://pype9.readthedocs.org
Mailing list: NeuralEnsemble Google Group
Issue tracker: https://github.com/NeuralEnsemble/pype9/issues
Supported Simulators
Pype9 works with either or both of the following simulator backends
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. weight)
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).
Examples
Given a cell model described in NineML saved in my_hodgkin_huxley.xml, the simulator pipeline can run from the command line:
$ 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
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 * un.ms, seed=1234) as sim:
hh = HodgkinHuxley('my_hodgkin_huxley.xml#hh_props', v=-65.0 * un.mV)
hh.record('v')
sim.run(100.0 * un.ms)
v = hh.recording('v')
Pype9 also supports network models described in NineML via integration with PyNN
$ 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
or
from pype9.simulator.neuron import Network, Simulation
from nineml import units as un
with Simulation(dt=0.01 * un.ms, seed=1234) as sim:
brunel_ai = Network('brunel.xml#AI')
brunel_ai.component_array('Exc').record('spike_output')
brunel_ai.component_array('Inh').record('spike_output')
sim.run(1000.0 * un.ms)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pype9-0.2.tar.gz
.
File metadata
- Download URL: pype9-0.2.tar.gz
- Upload date:
- Size: 116.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4942701e3729e96e2984e9cd828bd043a4f57ae749ee5bacfa27c6380966a64 |
|
MD5 | 453b09dbab2ad95c701d1c8e5733c6ad |
|
BLAKE2b-256 | 760928f22b2804dfa0896be38c2aaeb44628668c2d5a0efa6c5c28461d04eb3e |
File details
Details for the file pype9-0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pype9-0.2-py2.py3-none-any.whl
- Upload date:
- Size: 245.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9251a4bb8fd670e2041952ae85bd8e4675fbc6c60cfff393469718ec75f12fb8 |
|
MD5 | 7c95d009ddf96fde435b41eaebcafdbe |
|
BLAKE2b-256 | 3346483dbaa574873d15cc65f04942b265ae7f9b76d536cc94831a1d096b9e90 |