LFPy


NameLFPy JSON
Version 2.3.2 PyPI version JSON
download
home_pagehttp://LFPy.readthedocs.io
SummaryA module for modeling extracellular potentials of multicompartment neuron models built on NEURON
upload_time2024-09-10 20:10:52
maintainerLFPy-team
docs_urlNone
authorNone
requires_pythonNone
licenseLICENSE
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            LFPy  
====

Summary
-------

LFPy is a Python module for calculation of extracellular potentials from multicompartment neuron models.
It relies on the NEURON simulator (<http://www.neuron.yale.edu/neuron>) and uses the
Python interface (<http://www.frontiersin.org/neuroinformatics/10.3389/neuro.11.001.2009/abstract>) it provides.

Latest changes
--------------

Just updated LFPy? Please check the latest release notes: <https://github.com/LFPy/LFPy/releases>

Usage
-----
A brief video tutorial on LFPy is available here: <https://youtu.be/gCQkyTHZ1lw>

LFPy is preinstalled at the EBRAINS collaboratory, and you can test LFPy online without installation, by clicking this button:

[![](https://nest-simulator.org/TryItOnEBRAINS.png)](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FLFPy%2Ftutorial_at_EBRAINS&urlpath=tree%2Ftutorial_at_EBRAINS%2F&branch=main)

Note that you might need to be logged into an EBRAINS account for the link to work.
To get a free EBRAINS account, sign up here: https://www.ebrains.eu/page/sign-up

A basic simulation of extracellular potentials of a multicompartment neuron model set up with LFPy:

    >>> # import modules
    >>> import LFPy
    >>> from LFPy import Cell, Synapse, LineSourcePotential
    >>> import numpy as np
    >>> import matplotlib.pyplot as plt
    >>> # create Cell
    >>> cell = Cell(morphology=''.join(LFPy.__path__ +
    >>>                                ['/test/ball_and_sticks.hoc']),
    >>>             passive=True,  # NEURON 'pas' mechanism
    >>>             tstop=100,  # ms
    >>>            )
    >>> # create Synapse
    >>> synapse = Synapse(cell=cell,
    >>>                   idx=cell.get_idx("soma[0]"),  # soma segment index
    >>>                   syntype='Exp2Syn',  # two-exponential synapse
    >>>                   weight=0.005,  # max conductance (uS)
    >>>                   e=0,  # reversal potential (mV)
    >>>                   tau1=0.5,  # rise time constant
    >>>                   tau2=5.,  # decay time constant
    >>>                   record_current=True,  # record synapse current
    >>>                  )
    >>> synapse.set_spike_times(np.array([20., 40]))  # set activation times
    >>> # create extracellular predictor
    >>> lsp = LineSourcePotential(cell=cell,
    >>>                           x=np.zeros(11) + 10,  # x-coordinates of contacts (µm)
    >>>                           y=np.zeros(11),  # y-coordinates
    >>>                           z=np.arange(11)*20,  # z-coordinates
    >>>                           sigma=0.3,  # extracellular conductivity (S/m)
    >>>                          )
    >>> # execute simulation
    >>> cell.simulate(probes=[lsp])  # compute measurements at run time
    >>> # plot results
    >>> fig, axes = plt.subplots(3, 1, sharex=True, figsize=(12, 8))
    >>> axes[0].plot(cell.tvec, synapse.i)
    >>> axes[0].set_ylabel('i_syn (nA)')
    >>> axes[1].plot(cell.tvec, cell.somav)
    >>> axes[1].set_ylabel('V_soma (nA)')
    >>> axes[2].pcolormesh(cell.tvec, lsp.z, lsp.data, shading='auto')
    >>> axes[2].set_ylabel('z (µm)')
    >>> axes[2].set_xlabel('t (ms)')

Code status
-----------

[![PyPI version](https://badge.fury.io/py/LFPy.svg)](https://badge.fury.io/py/LFPy)
[![flake8 lint](https://github.com/LFPy/LFPy/actions/workflows/flake8.yml/badge.svg)](https://github.com/LFPy/LFPy/actions/workflows/flake8.yml)
![Python application](https://github.com/LFPy/LFPy/workflows/Python%20application/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/LFPy/LFPy/badge.svg?branch=master)](https://coveralls.io/github/LFPy/LFPy?branch=master)
[![Documentation Status](https://readthedocs.org/projects/lfpy/badge/?version=latest)](http://lfpy.readthedocs.io/en/latest/?badge=latest)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LFPy/LFPy_binder_examples/master)
[![DOI](https://zenodo.org/badge/78627256.svg)](https://zenodo.org/badge/latestdoi/78627256)

Conda-forge status
------------------

[![Conda Recipe](https://img.shields.io/badge/recipe-lfpy-green.svg)](https://anaconda.org/conda-forge/lfpy)
[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)
[![Conda Version](https://img.shields.io/conda/vn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)
[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)

Information
-----------

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 (www.neuron.yale.edu) already, it is likely that it can be adapted to work with LFPy.

The extracellular potentials are calculated from transmembrane currents in multicompartment 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 <http://www.csc.kth.se/~helinden/PettersenLindenDaleEinevoll-BookChapter-revised.pdf>

The first release of LFPy (v1.x) was mainly designed for simulation extracellular potentials of single neurons, described in our paper on the package in Frontiers in Neuroinformatics entitled "LFPy: A tool for biophysical simulation of extracellular potentials generated by detailed model neurons".
The article can be found at <https://dx.doi.org/10.3389/fninf.2013.00041>.
Since version 2 (LFPy v2.x), the tool also facilitates simulations of extracellular potentials and current dipole moment from ongoing activity in recurrently connected networks of multicompartment neurons, prediction of EEG scalp surface potentials,
MEG scalp surface magnetic fields, as described in the publication "Multimodal modeling of neural network activity: computing LFP, ECoG, EEG and MEG signals with LFPy2.0" by Espen Hagen, Solveig Naess, Torbjoern V Ness, Gaute T Einevoll, found at <https://dx.doi.org/10.3389/fninf.2018.00092>.

Citing LFPy
-----------

- 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 LFPy 2.0. Front. Neuroinform. 12:92. doi: 10.3389/fninf.2018.00092. <https://dx.doi.org/10.3389/fninf.2018.00092>

- 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. <https://dx.doi.org/10.3389/fninf.2013.00041>

LFPy was developed in the Computational Neuroscience Group, Department of Mathemathical Sciences and Technology (<http://www.nmbu.no/imt>),
at the Norwegian University of Life Sciences (<http://www.nmbu.no>),
in collaboration with the Laboratory of Neuroinformatics (<http://www.nencki.gov.pl/en/laboratory-of-neuroinformatics>),
Nencki Institute of Experimental Biology (<http://www.nencki.gov.pl>), Warsaw, Poland. The effort was supported by
International Neuroinformatics Coordinating Facility (<http://incf.org>), the Research Council of Norway (<http://www.forskningsradet.no/english>) (eScience, NevroNor),
EU-FP7 (BrainScaleS, <http://www.brainscales.org>),
the European Union Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreement No. 785907 and No. 945539 [Human Brain Project (HBP) SGA2, SGA3 and EBRAINS].

For updated information on LFPy and online documentation, see the LFPy homepage (<http://lfpy.readthedocs.io>).

Tutorial slides on LFPy
-----------------------

- Slides for OCNS 2019 meeting tutorial [T8: Biophysical modeling of extracellular potentials (using LFPy)](https://www.cnsorg.org/cns-2019-tutorials#T8) hosted in Barcelona, Spain on LFPy: [CNS2019 LFPy tutorial slides](https://LFPy.github.io/downloads/CNS2019_LFPy_tutorial.pdf "slides")
- Older tutorial slides can be found at [https://github.com/LFPy/LFPy.github.io/tree/master/downloads](https://github.com/LFPy/LFPy.github.io/tree/master/downloads)

Related projects
----------------

LFPy has been used extensively in ongoing and published work, and may be a required dependency by the publicly available Python modules:

- ViSAPy - Virtual Spiking Activity in Python (<https://github.com/espenhgn/ViSAPy>, <http://software.incf.org/software/visapy>),
  as described in Hagen, E., et al. (2015), J Neurosci Meth, DOI:`10.1016/j.jneumeth.2015.01.029 <http://dx.doi.org/10.1016/j.jneumeth.2015.01.029>`_

- ViMEAPy that can be used to incorporate heterogeneous conductivity in calculations of extracellular potentials with LFPy
  (<https://bitbucket.org/torbness/vimeapy>, <http://software.incf.org/software/vimeapy>). ViMEAPy and it's application is described
  in Ness, T. V., et al. (2015), Neuroinform, DOI:`10.1007/s12021-015-9265-6 <http://dx.doi.org/10.1007/s12021-015-9265-6>`_.

- hybridLFPy - biophysics-based hybrid scheme for calculating the local field potential (LFP) of spiking activity in simplified
  point-neuron network models (<https://github.com/INM-6/hybridLFPy>),
  as described in Hagen, E. and Dahmen, D., et al. (2016), Cereb Cortex, DOI:`10.1093/cercor/bhw237 <http://dx.doi.org/10.1093/cercor/bhw237>`_

- MEArec - Fast and customizable simulation of extracellular recordings on Multi-Electrode-Arrays (<https://github.com/alejoe91/MEArec>)
 as described in Buccino, A.P., Einevoll, G.T. MEArec: A Fast and Customizable Testbench Simulator for Ground-truth Extracellular Spiking Activity. Neuroinform (2020). <https://doi.org/10.1007/s12021-020-09467-7>

Requirements
------------

Dependencies should normally be automatically installed.
For manual preinstallation of dependencies, the following packages are needed:

- Python modules numpy, scipy, matplotlib, h5py
- MEAutility (<https://github.com/alejoe91/MEAutility>)
- LFPykit (<https://github.com/LFPy/LFPykit>)
- NEURON (from <http://www.neuron.yale.edu>) and corresponding Python module. The following should execute without error in a Python console:

        >>> import neuron
        >>> neuron.test()

- Cython (C-extensions for python, <http://cython.org>) to speed up simulations of extracellular fields

Installation
------------

There are few options to install LFPy:

1. From the Python Package Index with only local access using pip:

        pip install LFPy --user

    as sudoer (in general not recommended as system Python files may be overwritten):

        sudo pip install LFPy

    Upgrading LFPy from the Python package index (without attempts at upgrading dependencies):

        pip install --upgrade --no-deps LFPy --user

    LFPy release candidates can be installed as:

        pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple LFPy --user

2. From the Python Package Index with only local access using easy_install:

        easy_install --user LFPy

    As sudoer:

        sudo easy_install LFPy

3. From source:

        tar -xzf LFPy-x.x.tar.gz
        cd LFPy-x.x
        (sudo) python setup.py develop (--user)

4. Development version from the GitHub repository:

        git clone https://github.com/LFPy/LFPy.git
        cd LFPy
        (sudo) pip install -r requirements.txt (--user) # install dependencies
        (sudo) python setup.py develop (--user)

5. Anaconda Python (<https://www.anaconda.com>, macos/linux only):

    Add the conda-forge (<https://conda-forge.org>) as channel:

        conda config --add channels conda-forge
        conda config --set channel_priority strict  # suggested

    Create a new conda environment with LFPy and activate it:

        conda create -n lfpy python=3 pip lfpy  # creates new Python 3.x conda environment named lfpy with pip and LFPy and their dependencies
        conda activate lfpy  # activate the lfpy environment
        python -c "import LFPy; LFPy.run_tests()"  # check that installation is working

    LFPy can also be installed in existing conda environments if the dependency tree is solvable:

        conda activate <environment>
        conda install lfpy  # installs LFPy and its dependencies in the current conda environment

Uninstall
---------

To remove installed LFPy files it should suffice to issue (repeat until no more LFPy files are found):

    (sudo) pip uninstall LFPy

In case LFPy was installed using conda in an environment, it can be uninstalled by issuing:

    conda uninstall lfpy

Docker
------

We provide a Docker (<https://www.docker.com>) container recipe file with LFPy.
To get started, install Docker and issue either:

    # build Dockerfile from GitHub
    $ docker build -t lfpy https://raw.githubusercontent.com/LFPy/LFPy/master/Dockerfile
    $ docker run -it -p 5000:5000 lfpy:latest

or

    # build local Dockerfile (obtained by cloning repo, checkout branch etc.)
    $ docker build -t lfpy - < Dockerfile
    $ docker run -it -p 5000:5000 lfpy:latest

If the docker file should fail for some reason it is possible to store the build log and avoid build caches by issuing

    docker build --no-cache --progress=plain -t lfpy - < Dockerfile 2>&1 | tee lfpy.log

If the build is successful, 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 -it -p 5000:5000 lfpy

which mounts the present working dirctory (``$(pwd)``) to the ``/opt`` directory of the container.
Try mounting the ``LFPy`` source directory for example (by setting ``source="<path-to-LFPy>"``).
Various LFPy example files can then be found in the folder ``/opt/LFPy/examples/``
when the container is running.

Jupyter notebook servers running from within the
container can be accessed after invoking them by issuing:

    cd /opt/LFPy/examples/
    jupyter-notebook --ip 0.0.0.0 --port=5000 --no-browser --allow-root

and opening the resulting URL in a browser on the host computer, similar to:
<http://127.0.0.1:5000/?token=dcf8f859f859740fc858c568bdd5b015e0cf15bfc2c5b0c1>

HTML Documentation
------------------

To generate the html documentation also hosted at <https://lfpy.rtfd.io> using Sphinx,
issue from the LFPy source code directory:

    cd doc
    make html

The main html file is in ``_build/html/index.html``.
m2r2, Numpydoc and the Sphinx ReadTheDocs theme may be needed:

    pip install m2r2 --user
    pip install numpydoc --user
    pip install sphinx-rtd-theme --user

Physical units in LFPy
----------------------

Physical units follow the NEURON conventions found [here](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html).
The units in LFPy for given quantities are:

| Quantity                   | Symbol    | Unit      |
|----------------------------|-----------|-----------|
| Spatial dimensions         | x,y,z,d   | [μm]      |
| Potential                  | v, Phi, Φ | [mV]      |
| Reversal potential         | E         | [mV]      |
| Current                    | i         | [nA]      |
| Membrane capacitance       | c_m       | [μF/cm2]  |
| Conductance                | g         | [S/cm2]   |
| Synaptic conductance       | g         | [µS]      |
| Extracellular conductivity | sigma, σ  | [S/m]     |
| Current dipole moment      | P         | [nA µm]   |
| Magnetic field             | H         | [nA/µm]   |
| Magnetic permeability      | µ, mu     | [T m/A]   |
| Current Source Density     | CSD       | [nA/µm3]  |  

Note: resistance, conductance and capacitance are usually specific values, i.e per membrane area (lowercase r_m, g, c_m)
Depending on the mechanism files, some may use different units altogether, but this should be taken care of internally by NEURON.

            

Raw data

            {
    "_id": null,
    "home_page": "http://LFPy.readthedocs.io",
    "name": "LFPy",
    "maintainer": "LFPy-team",
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "lfpy@users.noreply.github.com",
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/94/f1/6c733d8222466d7d94ca3ca330b5fa32d91e26d8b59397178f0219a7d03a/lfpy-2.3.2.tar.gz",
    "platform": null,
    "description": "LFPy  \n====\n\nSummary\n-------\n\nLFPy is a Python module for calculation of extracellular potentials from multicompartment neuron models.\nIt relies on the NEURON simulator (<http://www.neuron.yale.edu/neuron>) and uses the\nPython interface (<http://www.frontiersin.org/neuroinformatics/10.3389/neuro.11.001.2009/abstract>) it provides.\n\nLatest changes\n--------------\n\nJust updated LFPy? Please check the latest release notes: <https://github.com/LFPy/LFPy/releases>\n\nUsage\n-----\nA brief video tutorial on LFPy is available here: <https://youtu.be/gCQkyTHZ1lw>\n\nLFPy is preinstalled at the EBRAINS collaboratory, and you can test LFPy online without installation, by clicking this button:\n\n[![](https://nest-simulator.org/TryItOnEBRAINS.png)](https://lab.ebrains.eu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FLFPy%2Ftutorial_at_EBRAINS&urlpath=tree%2Ftutorial_at_EBRAINS%2F&branch=main)\n\nNote that you might need to be logged into an EBRAINS account for the link to work.\nTo get a free EBRAINS account, sign up here: https://www.ebrains.eu/page/sign-up\n\nA basic simulation of extracellular potentials of a multicompartment neuron model set up with LFPy:\n\n    >>> # import modules\n    >>> import LFPy\n    >>> from LFPy import Cell, Synapse, LineSourcePotential\n    >>> import numpy as np\n    >>> import matplotlib.pyplot as plt\n    >>> # create Cell\n    >>> cell = Cell(morphology=''.join(LFPy.__path__ +\n    >>>                                ['/test/ball_and_sticks.hoc']),\n    >>>             passive=True,  # NEURON 'pas' mechanism\n    >>>             tstop=100,  # ms\n    >>>            )\n    >>> # create Synapse\n    >>> synapse = Synapse(cell=cell,\n    >>>                   idx=cell.get_idx(\"soma[0]\"),  # soma segment index\n    >>>                   syntype='Exp2Syn',  # two-exponential synapse\n    >>>                   weight=0.005,  # max conductance (uS)\n    >>>                   e=0,  # reversal potential (mV)\n    >>>                   tau1=0.5,  # rise time constant\n    >>>                   tau2=5.,  # decay time constant\n    >>>                   record_current=True,  # record synapse current\n    >>>                  )\n    >>> synapse.set_spike_times(np.array([20., 40]))  # set activation times\n    >>> # create extracellular predictor\n    >>> lsp = LineSourcePotential(cell=cell,\n    >>>                           x=np.zeros(11) + 10,  # x-coordinates of contacts (\u00b5m)\n    >>>                           y=np.zeros(11),  # y-coordinates\n    >>>                           z=np.arange(11)*20,  # z-coordinates\n    >>>                           sigma=0.3,  # extracellular conductivity (S/m)\n    >>>                          )\n    >>> # execute simulation\n    >>> cell.simulate(probes=[lsp])  # compute measurements at run time\n    >>> # plot results\n    >>> fig, axes = plt.subplots(3, 1, sharex=True, figsize=(12, 8))\n    >>> axes[0].plot(cell.tvec, synapse.i)\n    >>> axes[0].set_ylabel('i_syn (nA)')\n    >>> axes[1].plot(cell.tvec, cell.somav)\n    >>> axes[1].set_ylabel('V_soma (nA)')\n    >>> axes[2].pcolormesh(cell.tvec, lsp.z, lsp.data, shading='auto')\n    >>> axes[2].set_ylabel('z (\u00b5m)')\n    >>> axes[2].set_xlabel('t (ms)')\n\nCode status\n-----------\n\n[![PyPI version](https://badge.fury.io/py/LFPy.svg)](https://badge.fury.io/py/LFPy)\n[![flake8 lint](https://github.com/LFPy/LFPy/actions/workflows/flake8.yml/badge.svg)](https://github.com/LFPy/LFPy/actions/workflows/flake8.yml)\n![Python application](https://github.com/LFPy/LFPy/workflows/Python%20application/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/LFPy/LFPy/badge.svg?branch=master)](https://coveralls.io/github/LFPy/LFPy?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/lfpy/badge/?version=latest)](http://lfpy.readthedocs.io/en/latest/?badge=latest)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/LFPy/LFPy_binder_examples/master)\n[![DOI](https://zenodo.org/badge/78627256.svg)](https://zenodo.org/badge/latestdoi/78627256)\n\nConda-forge status\n------------------\n\n[![Conda Recipe](https://img.shields.io/badge/recipe-lfpy-green.svg)](https://anaconda.org/conda-forge/lfpy)\n[![Conda Downloads](https://img.shields.io/conda/dn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)\n[![Conda Version](https://img.shields.io/conda/vn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)\n[![Conda Platforms](https://img.shields.io/conda/pn/conda-forge/lfpy.svg)](https://anaconda.org/conda-forge/lfpy)\n\nInformation\n-----------\n\nLFPy 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 (www.neuron.yale.edu) already, it is likely that it can be adapted to work with LFPy.\n\nThe extracellular potentials are calculated from transmembrane currents in multicompartment neuron models using the line-source method (Holt & Koch, J Comp Neurosci 1999),\nbut 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\nindependent 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\nthe biophysics underlying the numerical framework used see this coming book chapter:\n\n- 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 <http://www.csc.kth.se/~helinden/PettersenLindenDaleEinevoll-BookChapter-revised.pdf>\n\nThe first release of LFPy (v1.x) was mainly designed for simulation extracellular potentials of single neurons, described in our paper on the package in Frontiers in Neuroinformatics entitled \"LFPy: A tool for biophysical simulation of extracellular potentials generated by detailed model neurons\".\nThe article can be found at <https://dx.doi.org/10.3389/fninf.2013.00041>.\nSince version 2 (LFPy v2.x), the tool also facilitates simulations of extracellular potentials and current dipole moment from ongoing activity in recurrently connected networks of multicompartment neurons, prediction of EEG scalp surface potentials,\nMEG scalp surface magnetic fields, as described in the publication \"Multimodal modeling of neural network activity: computing LFP, ECoG, EEG and MEG signals with LFPy2.0\" by Espen Hagen, Solveig Naess, Torbjoern V Ness, Gaute T Einevoll, found at <https://dx.doi.org/10.3389/fninf.2018.00092>.\n\nCiting LFPy\n-----------\n\n- LFPy v2.x: Hagen E, N\u00e6ss S, Ness TV and Einevoll GT (2018) Multimodal Modeling of Neural Network Activity: Computing LFP, ECoG, EEG, and MEG Signals With LFPy 2.0. Front. Neuroinform. 12:92. doi: 10.3389/fninf.2018.00092. <https://dx.doi.org/10.3389/fninf.2018.00092>\n\n- 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. <https://dx.doi.org/10.3389/fninf.2013.00041>\n\nLFPy was developed in the Computational Neuroscience Group, Department of Mathemathical Sciences and Technology (<http://www.nmbu.no/imt>),\nat the Norwegian University of Life Sciences (<http://www.nmbu.no>),\nin collaboration with the Laboratory of Neuroinformatics (<http://www.nencki.gov.pl/en/laboratory-of-neuroinformatics>),\nNencki Institute of Experimental Biology (<http://www.nencki.gov.pl>), Warsaw, Poland. The effort was supported by\nInternational Neuroinformatics Coordinating Facility (<http://incf.org>), the Research Council of Norway (<http://www.forskningsradet.no/english>) (eScience, NevroNor),\nEU-FP7 (BrainScaleS, <http://www.brainscales.org>),\nthe European Union Horizon 2020 Framework Programme for Research and Innovation under Specific Grant Agreement No. 785907 and No. 945539 [Human Brain Project (HBP) SGA2, SGA3 and EBRAINS].\n\nFor updated information on LFPy and online documentation, see the LFPy homepage (<http://lfpy.readthedocs.io>).\n\nTutorial slides on LFPy\n-----------------------\n\n- Slides for OCNS 2019 meeting tutorial [T8: Biophysical modeling of extracellular potentials (using LFPy)](https://www.cnsorg.org/cns-2019-tutorials#T8) hosted in Barcelona, Spain on LFPy: [CNS2019 LFPy tutorial slides](https://LFPy.github.io/downloads/CNS2019_LFPy_tutorial.pdf \"slides\")\n- Older tutorial slides can be found at [https://github.com/LFPy/LFPy.github.io/tree/master/downloads](https://github.com/LFPy/LFPy.github.io/tree/master/downloads)\n\nRelated projects\n----------------\n\nLFPy has been used extensively in ongoing and published work, and may be a required dependency by the publicly available Python modules:\n\n- ViSAPy - Virtual Spiking Activity in Python (<https://github.com/espenhgn/ViSAPy>, <http://software.incf.org/software/visapy>),\n  as described in Hagen, E., et al. (2015), J Neurosci Meth, DOI:`10.1016/j.jneumeth.2015.01.029 <http://dx.doi.org/10.1016/j.jneumeth.2015.01.029>`_\n\n- ViMEAPy that can be used to incorporate heterogeneous conductivity in calculations of extracellular potentials with LFPy\n  (<https://bitbucket.org/torbness/vimeapy>, <http://software.incf.org/software/vimeapy>). ViMEAPy and it's application is described\n  in Ness, T. V., et al. (2015), Neuroinform, DOI:`10.1007/s12021-015-9265-6 <http://dx.doi.org/10.1007/s12021-015-9265-6>`_.\n\n- hybridLFPy - biophysics-based hybrid scheme for calculating the local field potential (LFP) of spiking activity in simplified\n  point-neuron network models (<https://github.com/INM-6/hybridLFPy>),\n  as described in Hagen, E. and Dahmen, D., et al. (2016), Cereb Cortex, DOI:`10.1093/cercor/bhw237 <http://dx.doi.org/10.1093/cercor/bhw237>`_\n\n- MEArec - Fast and customizable simulation of extracellular recordings on Multi-Electrode-Arrays (<https://github.com/alejoe91/MEArec>)\n as described in Buccino, A.P., Einevoll, G.T. MEArec: A Fast and Customizable Testbench Simulator for Ground-truth Extracellular Spiking Activity. Neuroinform (2020). <https://doi.org/10.1007/s12021-020-09467-7>\n\nRequirements\n------------\n\nDependencies should normally be automatically installed.\nFor manual preinstallation of dependencies, the following packages are needed:\n\n- Python modules numpy, scipy, matplotlib, h5py\n- MEAutility (<https://github.com/alejoe91/MEAutility>)\n- LFPykit (<https://github.com/LFPy/LFPykit>)\n- NEURON (from <http://www.neuron.yale.edu>) and corresponding Python module. The following should execute without error in a Python console:\n\n        >>> import neuron\n        >>> neuron.test()\n\n- Cython (C-extensions for python, <http://cython.org>) to speed up simulations of extracellular fields\n\nInstallation\n------------\n\nThere are few options to install LFPy:\n\n1. From the Python Package Index with only local access using pip:\n\n        pip install LFPy --user\n\n    as sudoer (in general not recommended as system Python files may be overwritten):\n\n        sudo pip install LFPy\n\n    Upgrading LFPy from the Python package index (without attempts at upgrading dependencies):\n\n        pip install --upgrade --no-deps LFPy --user\n\n    LFPy release candidates can be installed as:\n\n        pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple LFPy --user\n\n2. From the Python Package Index with only local access using easy_install:\n\n        easy_install --user LFPy\n\n    As sudoer:\n\n        sudo easy_install LFPy\n\n3. From source:\n\n        tar -xzf LFPy-x.x.tar.gz\n        cd LFPy-x.x\n        (sudo) python setup.py develop (--user)\n\n4. Development version from the GitHub repository:\n\n        git clone https://github.com/LFPy/LFPy.git\n        cd LFPy\n        (sudo) pip install -r requirements.txt (--user) # install dependencies\n        (sudo) python setup.py develop (--user)\n\n5. Anaconda Python (<https://www.anaconda.com>, macos/linux only):\n\n    Add the conda-forge (<https://conda-forge.org>) as channel:\n\n        conda config --add channels conda-forge\n        conda config --set channel_priority strict  # suggested\n\n    Create a new conda environment with LFPy and activate it:\n\n        conda create -n lfpy python=3 pip lfpy  # creates new Python 3.x conda environment named lfpy with pip and LFPy and their dependencies\n        conda activate lfpy  # activate the lfpy environment\n        python -c \"import LFPy; LFPy.run_tests()\"  # check that installation is working\n\n    LFPy can also be installed in existing conda environments if the dependency tree is solvable:\n\n        conda activate <environment>\n        conda install lfpy  # installs LFPy and its dependencies in the current conda environment\n\nUninstall\n---------\n\nTo remove installed LFPy files it should suffice to issue (repeat until no more LFPy files are found):\n\n    (sudo) pip uninstall LFPy\n\nIn case LFPy was installed using conda in an environment, it can be uninstalled by issuing:\n\n    conda uninstall lfpy\n\nDocker\n------\n\nWe provide a Docker (<https://www.docker.com>) container recipe file with LFPy.\nTo get started, install Docker and issue either:\n\n    # build Dockerfile from GitHub\n    $ docker build -t lfpy https://raw.githubusercontent.com/LFPy/LFPy/master/Dockerfile\n    $ docker run -it -p 5000:5000 lfpy:latest\n\nor\n\n    # build local Dockerfile (obtained by cloning repo, checkout branch etc.)\n    $ docker build -t lfpy - < Dockerfile\n    $ docker run -it -p 5000:5000 lfpy:latest\n\nIf the docker file should fail for some reason it is possible to store the build log and avoid build caches by issuing\n\n    docker build --no-cache --progress=plain -t lfpy - < Dockerfile 2>&1 | tee lfpy.log\n\nIf the build is successful, the ``--mount`` option can be used to mount a folder on the host to a target folder as:\n\n    docker run --mount type=bind,source=\"$(pwd)\",target=/opt -it -p 5000:5000 lfpy\n\nwhich mounts the present working dirctory (``$(pwd)``) to the ``/opt`` directory of the container.\nTry mounting the ``LFPy`` source directory for example (by setting ``source=\"<path-to-LFPy>\"``).\nVarious LFPy example files can then be found in the folder ``/opt/LFPy/examples/``\nwhen the container is running.\n\nJupyter notebook servers running from within the\ncontainer can be accessed after invoking them by issuing:\n\n    cd /opt/LFPy/examples/\n    jupyter-notebook --ip 0.0.0.0 --port=5000 --no-browser --allow-root\n\nand opening the resulting URL in a browser on the host computer, similar to:\n<http://127.0.0.1:5000/?token=dcf8f859f859740fc858c568bdd5b015e0cf15bfc2c5b0c1>\n\nHTML Documentation\n------------------\n\nTo generate the html documentation also hosted at <https://lfpy.rtfd.io> using Sphinx,\nissue from the LFPy source code directory:\n\n    cd doc\n    make html\n\nThe main html file is in ``_build/html/index.html``.\nm2r2, Numpydoc and the Sphinx ReadTheDocs theme may be needed:\n\n    pip install m2r2 --user\n    pip install numpydoc --user\n    pip install sphinx-rtd-theme --user\n\nPhysical units in LFPy\n----------------------\n\nPhysical units follow the NEURON conventions found [here](https://www.neuron.yale.edu/neuron/static/docs/units/unitchart.html).\nThe units in LFPy for given quantities are:\n\n| Quantity                   | Symbol    | Unit      |\n|----------------------------|-----------|-----------|\n| Spatial dimensions         | x,y,z,d   | [\u03bcm]      |\n| Potential                  | v, Phi, \u03a6 | [mV]      |\n| Reversal potential         | E         | [mV]      |\n| Current                    | i         | [nA]      |\n| Membrane capacitance       | c_m       | [\u03bcF/cm2]  |\n| Conductance                | g         | [S/cm2]   |\n| Synaptic conductance       | g         | [\u00b5S]      |\n| Extracellular conductivity | sigma, \u03c3  | [S/m]     |\n| Current dipole moment      | P         | [nA \u00b5m]   |\n| Magnetic field             | H         | [nA/\u00b5m]   |\n| Magnetic permeability      | \u00b5, mu     | [T m/A]   |\n| Current Source Density     | CSD       | [nA/\u00b5m3]  |  \n\nNote: resistance, conductance and capacitance are usually specific values, i.e per membrane area (lowercase r_m, g, c_m)\nDepending on the mechanism files, some may use different units altogether, but this should be taken care of internally by NEURON.\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "A module for modeling extracellular potentials of multicompartment neuron models built on NEURON",
    "version": "2.3.2",
    "project_urls": {
        "Download": "https://github.com/LFPy/LFPy/tarball/v2.3.2",
        "Homepage": "http://LFPy.readthedocs.io"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1cc935313cc507545243f1c502e769322074b24811b5dbdc96d5bd03d58dece",
                "md5": "724e42802b3ad761fb7b4137e42cd47c",
                "sha256": "8bffa56f6b3a48afec4086de83573f2bb2854efcf7051f6dbb34743b980b127e"
            },
            "downloads": -1,
            "filename": "LFPy-2.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "724e42802b3ad761fb7b4137e42cd47c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 135936,
            "upload_time": "2024-09-10T20:10:50",
            "upload_time_iso_8601": "2024-09-10T20:10:50.336479Z",
            "url": "https://files.pythonhosted.org/packages/f1/cc/935313cc507545243f1c502e769322074b24811b5dbdc96d5bd03d58dece/LFPy-2.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94f16c733d8222466d7d94ca3ca330b5fa32d91e26d8b59397178f0219a7d03a",
                "md5": "d0c5362fdb05855b59f943672c070f8e",
                "sha256": "b20ba696ce7c717faa8e914884e329d30bdefd948ce100d1b843908b98f19101"
            },
            "downloads": -1,
            "filename": "lfpy-2.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "d0c5362fdb05855b59f943672c070f8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3140559,
            "upload_time": "2024-09-10T20:10:52",
            "upload_time_iso_8601": "2024-09-10T20:10:52.966650Z",
            "url": "https://files.pythonhosted.org/packages/94/f1/6c733d8222466d7d94ca3ca330b5fa32d91e26d8b59397178f0219a7d03a/lfpy-2.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-10 20:10:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LFPy",
    "github_project": "LFPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "lfpy"
}
        
Elapsed time: 0.41861s