(Looking for the old LFPy documentation? Follow link)
LFPy is a Python package for calculation of extracellular potentials from multicompartment neuron models and recurrent networks of multicompartment neurons. It relies on the NEURON simulator and uses the Python interface it provides.
LFPy provides a set of easy-to-use Python classes for setting up your model, running your simulations and calculating the extracellular potentials arising from activity in your model neuron. If you have a model working in NEURON or NeuroML2 already, it is likely that it can be adapted to work with LFPy.
The extracellular potentials are calculated from transmembrane currents in multi-compartment neuron models using the line-source method (Holt & Koch, J Comp Neurosci 1999), but a simpler point-source method is also available. The calculations assume that the neuron are surrounded by an infinite extracellular medium with homogeneous and frequency independent conductivity, and compartments are assumed to be at least at a minimal distance from the electrode (which can be specified by the user). For more information on the biophysics underlying the numerical framework used see this coming book chapter:
- K.H. Pettersen, H. Linden, A.M. Dale and G.T. Einevoll: Extracellular spikes and current-source density, in Handbook of Neural Activity Measurement, edited by R. Brette and A. Destexhe, Cambridge, to appear [preprint PDF, 5.7MB]
In previous versions (v1.x.x), LFPy was mainly designed for simulation of single neurons, but the forward modeling scheme is in general applicable to neuronal populations. These aspects, and the biophysical assumptions behind LFPy is described in our paper on the package appearing in Frontiers in Neuroinformatics, entitled “LFPy: A tool for biophysical simulation of extracellular potentials generated by detailed model neurons”, appearing as part of the research topic “Python in Neuroscience II”.
Since v2, LFPy also supports networks of multicompartment neurons, calculations of current-dipole moments, and predictions of both electric potentials and magnetic signals from a series of different volume-conductor models, as described in the bioRXiv preprint “Multimodal modeling of neural network activity: computing LFP, ECoG, EEG and MEG signals with LFPy2.0” by Espen Hagen, Solveig Næss, Torbjørn V Ness, Gaute T Einevoll, found at https://doi.org/10.1101/281717.
- LFPy v2.x: Hagen E, Næss S, Ness TV and Einevoll GT (2018). Multimodal modeling of neural network activity: computing LFP, ECoG, EEG and MEG signals with LFPy2.0. bioRXiv. doi: 10.1101/281717
- LFPy v1.x: Linden H, Hagen E, Leski S, Norheim ES, Pettersen KH and Einevoll GT (2013). LFPy: A tool for biophysical simulation of extracellular potentials generated by detailed model neurons. Front. Neuroinform. 7:41. doi: 10.3389/fninf.2013.00041
LFPy was developed in the Computational Neuroscience Group, Department of Mathemathical Sciences and Technology, at the Norwegian University of Life Sciences , in collaboration with the Laboratory of Neuroinformatics, Nencki Institute of Experimental Biology, Warsaw, Poland, and Center for Integrative Neuroplasticity (CINPLA) at the University of Oslo, Norway. The effort was supported by International Neuroinformatics Coordinating Facility (INCF), The Research Council of Norway (eScience, NevroNor, COBRA) and EU-FP7 (BrainScaleS).
This scientific software is released under the GNU Public License GPLv3.
Tutorial slides on LFPy¶
Slides for OCNS 2017 meeting tutorial T4: Modeling and analysis of extracellular potentials hosted in Antwerp, Belgium on LFPy and hybridLFPy: CNS2017_LFPy_tutorial.pdf
Slides from OCNS 2015 meeting tutorial T2: Modeling and analysis of extracellular potentials hosted in Prague, Czech Republic on LFPy and hybridLFPy: CNS2015_LFPy_tutorial.pdf
Slides from OCNS 2014 meeting tutorial T4: Modeling and analysis of extracellular potentials hosted in Quebec City: hybridlfpy_tutorial_OCNS2014.pdf
As part of the OCNS 2013 meeting workshop Modeling and interpretation of extracellular potentials, there was also a talk on LFPy. The slides can be found here: lfpy-tutorial_OCNS2013.pdf.
- Download LFPy
- Developing LFPy
- Getting started
- Installing NEURON with Python
- Installing NEURON with Python from source
- LFPy on the Neuroscience Gateway Portal
- LFPy Tutorial
- Notes on LFPy