Skip to main content

methods to calculate extracellular signals of neural activity from spike events from spiking neuron networks

Project description


Python module implementing a hybrid scheme for predictions of extracellular potentials (local field potentials, LFPs) of spiking neuron network simulations.

Project Status

DOI Documentation Status Upload Python Package Python pytest License


The module hybridLFPy was mainly developed in the Computational Neuroscience Group (, Department of Mathemathical Sciences and Technology (, at the Norwegian University of Life Sciences (, Aas, Norway, in collaboration with Institute of Neuroscience and Medicine (INM-6) and Institute for Advanced Simulation (IAS-6), Juelich Research Centre and JARA, Juelich, Germany (


Should you find hybridLFPy useful for your research, please cite the following paper:

Espen Hagen, David Dahmen, Maria L. Stavrinou, Henrik Lindén, Tom Tetzlaff,
Sacha J. van Albada, Sonja Grün, Markus Diesmann, Gaute T. Einevoll;
Hybrid Scheme for Modeling Local Field Potentials from Point-Neuron Networks,
Cerebral Cortex, Volume 26, Issue 12, 1 December 2016, Pages 4461–4496,

Bibtex source:

author = {Hagen, Espen and Dahmen, David and Stavrinou, Maria L. and Lindén,
  Henrik and Tetzlaff, Tom and van Albada, Sacha J. and Grün, Sonja and
  Diesmann, Markus and Einevoll, Gaute T.},
title = {Hybrid Scheme for Modeling Local Field Potentials from
  Point-Neuron Networks},
journal = {Cerebral Cortex},
volume = {26},
number = {12},
pages = {4461-4496},
year = {2016},
doi = {10.1093/cercor/bhw237},
URL = { +},
eprint = {/oup/backfile/content_public/journal/cercor/26/12/10.1093_cercor_bhw237/2/bhw237.pdf}


This software is released under the General Public License (see the LICENSE file).


This software comes without any form of warranty.


First download all the hybridLFPy source files using git ( Open a terminal window and type:

cd $HOME/where/to/put/hybridLFPy
git clone

To use hybridLFPy from any working folder without copying files, run:

(sudo) pip install -e . (--user)

Installing it is also possible, but not recommended as things might change with future pulls from the repository:

(sudo) pip install . (--user)

examples folder

Some example script(s) on how to use this module

docs folder

Source files for autogenerated documentation using Sphinx (

To compile documentation source files in this directory using sphinx, use:

sphinx-build -b html docs documentation


The provided Dockerfile provides a Docker container recipe for x86_64 hosts with all dependencies required to run simulation files provided in examples. To build and run the container locally, get Docker from and issue the following (replace <image-name> with a name of your choosing):

docker build -t <image-name> -< Dockerfile
docker run -it -p 5000:5000 <image-name>:latest

The --mount option can be used to mount a folder on the host to a target folder as:

docker run --mount type=bind,source="$(pwd)",target=/opt/hybridLFPy \
-it -p 5000:5000 <image-name>

Then, code examples may be run as:

cd /opt/hybridLFPy/examples
nrnivmodl  # compile local .mod (NMODL) files
mpirun --allow-run-as-root python3

Online documentation

The sphinx-generated html documentation can be accessed at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hybridLFPy-0.2.tar.gz (50.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page