Name | LFPykernels JSON |
Version |
0.2.0
JSON |
| download |
home_page | https://github.com/LFPy/LFPykernels |
Summary | Causal spike-signal impulse response functions for finite-sized neuronal network models |
upload_time | 2023-05-23 09:24:38 |
maintainer | |
docs_url | None |
author | LFPy-team |
requires_python | >=3.7 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# LFPykernels
The ``LFPykernels`` package incorporates forward-model based calculations of causal spike-signal
impulse response functions for finite-sized neuronal network models.
## Build Status
[![DOI](https://zenodo.org/badge/424143558.svg)](https://zenodo.org/badge/latestdoi/424143558)
[![Coverage Status](https://coveralls.io/repos/github/LFPy/LFPykernels/badge.svg?branch=main)](https://coveralls.io/github/LFPy/LFPykernels?branch=main)
[![Documentation Status](https://readthedocs.org/projects/lfpykernels/badge/?version=latest)](https://lfpykernels.readthedocs.io/en/latest/?badge=latest)
[![flake8 lint](https://github.com/LFPy/LFPykernels/actions/workflows/flake8.yml/badge.svg)](https://github.com/LFPy/LFPykernels/actions/workflows/flake8.yml)
[![Python application](https://github.com/LFPy/LFPykernels/workflows/Python%20application/badge.svg)](https://github.com/LFPy/LFPykernels/actions?query=workflow%3A%22Python+application%22)
[![Upload Python Package](https://github.com/LFPy/LFPykernels/workflows/Upload%20Python%20Package/badge.svg)](https://pypi.org/project/LFPykernels)
[![License](http://img.shields.io/:license-GPLv3+-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)
## Citation
These codes correspond to results shown in the peer-reviewed manuscript:
Hagen E, Magnusson SH, Ness TV, Halnes G, Babu PN, et al. (2022)
Brain signal predictions from multi-scale networks using a linearized framework.
PLOS Computational Biology 18(8): e1010353. <https://doi.org/10.1371/journal.pcbi.1010353>
Bibtex format:
@article{10.1371/journal.pcbi.1010353,
doi = {10.1371/journal.pcbi.1010353},
author = {Hagen, Espen AND Magnusson, Steinn H. AND Ness, Torbjørn V. AND Halnes, Geir AND Babu, Pooja N. AND Linssen, Charl AND Morrison, Abigail AND Einevoll, Gaute T.},
journal = {PLOS Computational Biology},
publisher = {Public Library of Science},
title = {Brain signal predictions from multi-scale networks using a linearized framework},
year = {2022},
month = {08},
volume = {18},
url = {https://doi.org/10.1371/journal.pcbi.1010353},
pages = {1-51},
number = {8},
}
If you use this software, please cite it as (change `<version>/<git-SHA>/<git-tag>` accordingly):
Hagen, Espen. (2021). LFPykernels (<version>/<git-SHA>/<git-tag>). Zenodo. https://doi.org/10.5281/zenodo.5720619
BibTex format:
@software{hagen_espen_2021_5720619,
author = {Hagen, Espen},
title = {LFPykernels},
month = nov,
year = 2021,
note = {If you use this software, please cite it as below.},
publisher = {Zenodo},
version = {<version>/<git-SHA>/<git-tag>},
doi = {10.5281/zenodo.5720619},
url = {https://doi.org/10.5281/zenodo.5720619}
}
If you use or refer to this work, please cite it as above.
Adaptations or modifications of this work should comply with the provided `LICENSE` file provided with this repository.
## Features
The ``LFPykernels`` package incorporates forward-model based calculations of causal spike-signal
impulse response functions for finite-sized neuronal network models.
The signals considered are low-frequency extracellular potentials ("local field potential" - LFP)
or current dipole moments (and by extension EEG and MEG like signals) that are
thought to mainly stem from synaptic currents and associated return currents.
The basic idea is that the effect of any spike event in each presynaptic
population on each signal type can be captured by single linearised multicompartment neuron
models representative of each population and simultaneously accounting for known distributions of
cells and synapses in space, distributions of delays, synaptic currents and associated return currents.
The present methodology is described in detail by [Hagen E et al., 2022](https://doi.org/10.1371/journal.pcbi.1010353).
The intended use for filter kernels predicted using ``LFPykernels`` is forward-model based signal predictions
from neuronal network simulation frameworks using simplified neuron representations like leaky integrate-and-fire
point neurons or rate-based neurons, but can also be used with biophysically detailed network models.
Let `$\nu_X(t)$` describe presynaptic population spike rates in units of spikes/dt
and `$H_{YX}(\mathbf{R}, \tau)$` predicted spike-signal kernels for the connections between presynaptic populations `$X$` and
postsynaptic populations `$Y$` the full signal may then be computed via the sum over linear convolutions:
``` math
V(\mathbf{R}, t) = \sum_X \sum_Y (\nu_X \ast H_{YX})(\mathbf{R}, t)
```
A more elaborate example combining kernel predictions with a spiking point-neuron network simulation is provided in the example notebook
<https://github.com/LFPy/LFPykernels/blob/main/examples/LIF_net_forward_model_predictions.ipynb>
For questions, please raise an issue at <https://github.com/LFPy/LFPykernels/issues>.
## Usage
Example prediction of kernel function `$H(\mathbf{R},\tau)$` mapping spike events of a
presynaptic inhibitory population `$X==\mathrm{I}$` to extracellular potential contributions by a
postsynaptic excitatory population `$Y==\mathrm{E}$` (see <https://github.com/LFPy/LFPykernels/blob/main/examples/README_example.ipynb>):
import os
import matplotlib.pyplot as plt
import scipy.stats as st
import numpy as np
from lfpykernels import GaussCylinderPotential, KernelApprox
import neuron
# recompile mod files if needed
mech_loaded = neuron.load_mechanisms('mod')
if not mech_loaded:
os.system('cd mod && nrnivmodl && cd -')
mech_loaded = neuron.load_mechanisms('mod')
print(f'mechanisms loaded: {mech_loaded}')
# misc parameters
dt = 2**-4 # time resolution (ms)
t_X = 500 # time of synaptic activations (ms)
tau = 50 # duration of impulse response function after onset (ms)
Vrest = -65 # assumed average postsynaptic potential (mV)
X=['E', 'I'] # presynaptic population names
N_X = np.array([8192, 1024]) # presynpatic population sizes
Y = 'E' # postsynaptic population
N_Y = 8192 # postsynaptic population size
C_YX = np.array([0.05, 0.05]) # pairwise connection probability between populations X and Y
nu_X = {'E': 2.5, 'I': 5.0} # assumed spike rates of each population (spikes/s)
g_eff = True # account for changes in passive leak due to persistent synaptic activations
def set_passive(cell, Vrest):
"""Insert passive leak channel across all sections
Parameters
----------
cell: object
LFPy.NetworkCell like object
Vrest: float
Steady state potential
"""
for sec in cell.template.all:
sec.insert('pas')
sec.g_pas = 0.0003 # (S/cm2)
sec.e_pas = Vrest # (mV)
# parameters for LFPy.NetworkCell representative of postsynaptic population
cellParameters={
'templatefile': 'BallAndSticksTemplate.hoc',
'templatename': 'BallAndSticksTemplate',
'custom_fun': [set_passive],
'custom_fun_args': [{'Vrest': Vrest}],
'templateargs': None,
'delete_sections': False,
'morphology': 'BallAndSticks_E.hoc'}
populationParameters={
'radius': 150.0, # population radius (µm)
'loc': 0.0, # average depth of cell bodies (µm)
'scale': 75.0} # standard deviation (µm)
# Predictor for extracellular potentials across depth assuming planar disk source
# elements convolved with Gaussian along z-axis.
# See https://lfpykernels.readthedocs.io/en/latest/#class-gausscylinderpotential for details
probe = GaussCylinderPotential(
cell=None,
z=np.linspace(1000., -200., 13), # depth of contacts (µm)
sigma=0.3, # tissue conductivity (S/m)
R=populationParameters['radius'], #
sigma_z=populationParameters['scale'],
)
# Create KernelApprox object. See https://lfpykernels.readthedocs.io/en/latest/#class-kernelapprox for details
kernel = KernelApprox(
X=X,
Y=Y,
N_X=N_X,
N_Y=N_Y,
C_YX=C_YX,
cellParameters=cellParameters,
populationParameters=populationParameters,
# function and parameters used to estimate average multapse count:
multapseFunction=st.truncnorm,
multapseParameters=[
{'a': (1 - 2.) / .6, 'b': (10 - 2.) / .6, 'loc': 2.0, 'scale': 0.6},
{'a': (1 - 5.) / 1.1, 'b': (10 - 5.) / 1.1, 'loc': 5.0, 'scale': 1.1}],
# function and parameters for delay distribution from connections between a
# population in X onto population Y:
delayFunction=st.truncnorm,
delayParameters=[{'a': -2.2, 'b': np.inf, 'loc': 1.3, 'scale': 0.5},
{'a': -1.5, 'b': np.inf, 'loc': 1.2, 'scale': 0.6}],
# parameters for synapses from connections by populations X onto Y
synapseParameters=[
{'weight': 0.00012, 'syntype': 'Exp2Syn', 'tau1': 0.2, 'tau2': 1.8, 'e': 0.0},
{'weight': 0.002, 'syntype': 'Exp2Syn', 'tau1': 0.1, 'tau2': 9.0, 'e': -80.0}],
# parameters for spatial synaptic connectivity by populations X onto Y
synapsePositionArguments=[
{'section': ['apic', 'dend'],
'fun': [st.norm],
'funargs': [{'loc': 50.0, 'scale': 100.0}],
'funweights': [1.0]},
{'section': ['soma', 'apic', 'dend'],
'fun': [st.norm],
'funargs': [{'loc': -100.0, 'scale': 100.0}],
'funweights': [1.0]}],
# parameters for extrinsic synaptic input
extSynapseParameters={'syntype': 'Exp2Syn', 'weight': 0.0002, 'tau1': 0.2, 'tau2': 1.8, 'e': 0.0},
nu_ext=40., # external activation rate (spikes/s)
n_ext=450, # number of extrinsic synapses
nu_X=nu_X,
)
# make kernel predictions for connection from populations X='I' onto Y='E'
H = kernel.get_kernel(
probes=[probe],
Vrest=Vrest, dt=dt, X='I', t_X=t_X, tau=tau,
g_eff=g_eff)
## Physical units
Notes on physical units used in `LFPykernels`:
- There are no explicit checks for physical units
- Transmembrane currents are assumed to be in units of (nA)
- Spatial information is assumed to be in units of (µm)
- Voltages are assumed to be in units of (mV)
- Extracellular conductivities are assumed to be in units of (S/m)
- current dipole moments are assumed to be in units of (nA µm)
- Magnetic fields are assumed to be in units of (nA/µm)
- Simulation times are assumed to be in units of (ms) with step size ∆t
- Spike rates are assumed to be in units of (# spikes / ∆t)
## Documentation
The online Documentation of `LFPykernels` can be found here:
<https://lfpykernels.readthedocs.io/en/latest>
## Dependencies
`LFPykernels` is implemented in Python and is written (and continuously tested) for `Python >= 3.7` (older versions may or may not work).
The main `LFPykernels` module depends on ``LFPy`` (<https://github.com/LFPy/LFPy>, <https://LFPy.readthedocs.io>).
Running all unit tests and example files may in addition require `py.test`, `matplotlib`,
`LFPy`.
## Installation
### From development sources (<https://github.com/LFPy/LFPykernels>)
Install the current development version on <https://GitHub.com> using `git` (<https://git-scm.com>):
git clone https://github.com/LFPy/LFPykernels.git
cd LFPykernels
python setup.py install # --user optional
or using `pip`:
pip install . # --user optional
For active development, link the repository location
pip install -e . # --user optional
### Installation of stable releases on PyPI.org (<https://www.pypi.org>)
Installing stable releases from the Python Package Index (<https://www.pypi.org/project/lfpykernels>):
pip install lfpykernels # --user optional
To upgrade the installation using pip:
pip install --upgrade --no-deps lfpykernels
## Docker
We provide a Docker (<https://www.docker.com>) container recipe file with LFPykernels etc.
To get started, install Docker and issue either:
# build Dockerfile from GitHub
docker build -t lfpykernels https://raw.githubusercontent.com/LFPy/LFPykernels/main/Dockerfile
docker run -it -p 5000:5000 lfpykernels
or
# build local Dockerfile (obtained by cloning repo, checkout branch etc.)
docker build -t lfpykernels - < Dockerfile
docker run -it -p 5000:5000 lfpykernels
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 lfpykernels - < Dockerfile 2>&1 | tee lfpykernels.log
For successful builds, 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/data -it -p 5000:5000 lfpykernels
which mounts the present working dirctory (``$(pwd)``) to the ``/opt/data`` directory of the container.
Try mounting the ``LFPykernels`` source directory for example (by setting ``source="<path-to-LFPykernels>"``).
Various example files can then be found in the folder ``/opt/data/examples/``
when the container is running.
Jupyter notebook servers running from within the
container can be accessed after invoking them by issuing:
cd /opt/data/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>
## Acknowledgements
This work was supported by the European Union Horizon 2020 Research and
Innovation Programme under Grant Agreement No. 785907 and No. 945539 Human Brain Project (HBP) SGA2 and SGA3.
We also acknowledge the use of Fenix Infrastructure resources,
which are partially funded from the European Union’s Horizon 2020 Research and Innovation Programme
through the ICEI Project under the Grant Agreement No. 800858; The Helmholtz Alliance through the Initiative and
Networking Fund of the Helmholtz Association and the Helmholtz Portfolio theme Supercomputing
and Modeling for the Human Brain; and The Excellence Strategy of the Federal Government and
the La¨nder [G:(DE-82)EXS-PF-JARA-SDS005, G: (DE-82)EXS-SF-neuroIC002].
Raw data
{
"_id": null,
"home_page": "https://github.com/LFPy/LFPykernels",
"name": "LFPykernels",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "LFPy-team",
"author_email": "lfpy@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/70/29/de4f93448855a18a7d147b5b0d8663aabc2f02fa93e0ee624f9a5669d75b/LFPykernels-0.2.0.tar.gz",
"platform": null,
"description": "# LFPykernels\n\nThe ``LFPykernels`` package incorporates forward-model based calculations of causal spike-signal\nimpulse response functions for finite-sized neuronal network models.\n\n## Build Status\n\n[![DOI](https://zenodo.org/badge/424143558.svg)](https://zenodo.org/badge/latestdoi/424143558)\n[![Coverage Status](https://coveralls.io/repos/github/LFPy/LFPykernels/badge.svg?branch=main)](https://coveralls.io/github/LFPy/LFPykernels?branch=main)\n[![Documentation Status](https://readthedocs.org/projects/lfpykernels/badge/?version=latest)](https://lfpykernels.readthedocs.io/en/latest/?badge=latest)\n[![flake8 lint](https://github.com/LFPy/LFPykernels/actions/workflows/flake8.yml/badge.svg)](https://github.com/LFPy/LFPykernels/actions/workflows/flake8.yml)\n[![Python application](https://github.com/LFPy/LFPykernels/workflows/Python%20application/badge.svg)](https://github.com/LFPy/LFPykernels/actions?query=workflow%3A%22Python+application%22)\n[![Upload Python Package](https://github.com/LFPy/LFPykernels/workflows/Upload%20Python%20Package/badge.svg)](https://pypi.org/project/LFPykernels)\n[![License](http://img.shields.io/:license-GPLv3+-green.svg)](http://www.gnu.org/licenses/gpl-3.0.html)\n\n## Citation\n\nThese codes correspond to results shown in the peer-reviewed manuscript:\n\nHagen E, Magnusson SH, Ness TV, Halnes G, Babu PN, et al. (2022)\nBrain signal predictions from multi-scale networks using a linearized framework.\nPLOS Computational Biology 18(8): e1010353. <https://doi.org/10.1371/journal.pcbi.1010353>\n\nBibtex format:\n\n @article{10.1371/journal.pcbi.1010353,\n doi = {10.1371/journal.pcbi.1010353},\n author = {Hagen, Espen AND Magnusson, Steinn H. AND Ness, Torbj\u00f8rn V. AND Halnes, Geir AND Babu, Pooja N. AND Linssen, Charl AND Morrison, Abigail AND Einevoll, Gaute T.},\n journal = {PLOS Computational Biology},\n publisher = {Public Library of Science},\n title = {Brain signal predictions from multi-scale networks using a linearized framework},\n year = {2022},\n month = {08},\n volume = {18},\n url = {https://doi.org/10.1371/journal.pcbi.1010353},\n pages = {1-51},\n number = {8},\n }\n\nIf you use this software, please cite it as (change `<version>/<git-SHA>/<git-tag>` accordingly):\n\n Hagen, Espen. (2021). LFPykernels (<version>/<git-SHA>/<git-tag>). Zenodo. https://doi.org/10.5281/zenodo.5720619\n\nBibTex format:\n\n @software{hagen_espen_2021_5720619,\n author = {Hagen, Espen},\n title = {LFPykernels},\n month = nov,\n year = 2021,\n note = {If you use this software, please cite it as below.},\n publisher = {Zenodo},\n version = {<version>/<git-SHA>/<git-tag>},\n doi = {10.5281/zenodo.5720619},\n url = {https://doi.org/10.5281/zenodo.5720619}\n }\n\nIf you use or refer to this work, please cite it as above.\nAdaptations or modifications of this work should comply with the provided `LICENSE` file provided with this repository. \n\n## Features\n\nThe ``LFPykernels`` package incorporates forward-model based calculations of causal spike-signal\nimpulse response functions for finite-sized neuronal network models.\nThe signals considered are low-frequency extracellular potentials (\"local field potential\" - LFP)\nor current dipole moments (and by extension EEG and MEG like signals) that are\nthought to mainly stem from synaptic currents and associated return currents.\nThe basic idea is that the effect of any spike event in each presynaptic\npopulation on each signal type can be captured by single linearised multicompartment neuron\nmodels representative of each population and simultaneously accounting for known distributions of\ncells and synapses in space, distributions of delays, synaptic currents and associated return currents.\n\nThe present methodology is described in detail by [Hagen E et al., 2022](https://doi.org/10.1371/journal.pcbi.1010353).\nThe intended use for filter kernels predicted using ``LFPykernels`` is forward-model based signal predictions\nfrom neuronal network simulation frameworks using simplified neuron representations like leaky integrate-and-fire\npoint neurons or rate-based neurons, but can also be used with biophysically detailed network models.\n\nLet `$\\nu_X(t)$` describe presynaptic population spike rates in units of spikes/dt\nand `$H_{YX}(\\mathbf{R}, \\tau)$` predicted spike-signal kernels for the connections between presynaptic populations `$X$` and\npostsynaptic populations `$Y$` the full signal may then be computed via the sum over linear convolutions:\n\n``` math\nV(\\mathbf{R}, t) = \\sum_X \\sum_Y (\\nu_X \\ast H_{YX})(\\mathbf{R}, t)\n```\n\nA more elaborate example combining kernel predictions with a spiking point-neuron network simulation is provided in the example notebook\n<https://github.com/LFPy/LFPykernels/blob/main/examples/LIF_net_forward_model_predictions.ipynb>\n\nFor questions, please raise an issue at <https://github.com/LFPy/LFPykernels/issues>.\n\n## Usage\n\nExample prediction of kernel function `$H(\\mathbf{R},\\tau)$` mapping spike events of a\npresynaptic inhibitory population `$X==\\mathrm{I}$` to extracellular potential contributions by a\npostsynaptic excitatory population `$Y==\\mathrm{E}$` (see <https://github.com/LFPy/LFPykernels/blob/main/examples/README_example.ipynb>):\n\n import os\n import matplotlib.pyplot as plt\n import scipy.stats as st\n import numpy as np\n from lfpykernels import GaussCylinderPotential, KernelApprox\n import neuron\n\n # recompile mod files if needed\n mech_loaded = neuron.load_mechanisms('mod')\n if not mech_loaded:\n os.system('cd mod && nrnivmodl && cd -')\n mech_loaded = neuron.load_mechanisms('mod')\n print(f'mechanisms loaded: {mech_loaded}')\n\n # misc parameters\n dt = 2**-4 # time resolution (ms)\n t_X = 500 # time of synaptic activations (ms)\n tau = 50 # duration of impulse response function after onset (ms)\n Vrest = -65 # assumed average postsynaptic potential (mV)\n\n X=['E', 'I'] # presynaptic population names\n N_X = np.array([8192, 1024]) # presynpatic population sizes\n Y = 'E' # postsynaptic population\n N_Y = 8192 # postsynaptic population size\n C_YX = np.array([0.05, 0.05]) # pairwise connection probability between populations X and Y\n nu_X = {'E': 2.5, 'I': 5.0} # assumed spike rates of each population (spikes/s)\n g_eff = True # account for changes in passive leak due to persistent synaptic activations\n\n def set_passive(cell, Vrest):\n \"\"\"Insert passive leak channel across all sections\n\n Parameters\n ----------\n cell: object\n LFPy.NetworkCell like object\n Vrest: float\n Steady state potential\n \"\"\"\n for sec in cell.template.all:\n sec.insert('pas')\n sec.g_pas = 0.0003 # (S/cm2)\n sec.e_pas = Vrest # (mV)\n\n # parameters for LFPy.NetworkCell representative of postsynaptic population\n cellParameters={\n 'templatefile': 'BallAndSticksTemplate.hoc',\n 'templatename': 'BallAndSticksTemplate',\n 'custom_fun': [set_passive],\n 'custom_fun_args': [{'Vrest': Vrest}],\n 'templateargs': None,\n 'delete_sections': False,\n 'morphology': 'BallAndSticks_E.hoc'}\n\n populationParameters={\n 'radius': 150.0, # population radius (\u00b5m)\n 'loc': 0.0, # average depth of cell bodies (\u00b5m)\n 'scale': 75.0} # standard deviation (\u00b5m)\n\n # Predictor for extracellular potentials across depth assuming planar disk source\n # elements convolved with Gaussian along z-axis.\n # See https://lfpykernels.readthedocs.io/en/latest/#class-gausscylinderpotential for details\n probe = GaussCylinderPotential(\n cell=None,\n z=np.linspace(1000., -200., 13), # depth of contacts (\u00b5m)\n sigma=0.3, # tissue conductivity (S/m)\n R=populationParameters['radius'], #\n sigma_z=populationParameters['scale'],\n )\n\n # Create KernelApprox object. See https://lfpykernels.readthedocs.io/en/latest/#class-kernelapprox for details\n kernel = KernelApprox(\n X=X,\n Y=Y,\n N_X=N_X,\n N_Y=N_Y,\n C_YX=C_YX,\n cellParameters=cellParameters,\n populationParameters=populationParameters,\n # function and parameters used to estimate average multapse count:\n multapseFunction=st.truncnorm,\n multapseParameters=[\n {'a': (1 - 2.) / .6, 'b': (10 - 2.) / .6, 'loc': 2.0, 'scale': 0.6},\n {'a': (1 - 5.) / 1.1, 'b': (10 - 5.) / 1.1, 'loc': 5.0, 'scale': 1.1}],\n # function and parameters for delay distribution from connections between a\n # population in X onto population Y:\n delayFunction=st.truncnorm,\n delayParameters=[{'a': -2.2, 'b': np.inf, 'loc': 1.3, 'scale': 0.5},\n {'a': -1.5, 'b': np.inf, 'loc': 1.2, 'scale': 0.6}],\n # parameters for synapses from connections by populations X onto Y\n synapseParameters=[\n {'weight': 0.00012, 'syntype': 'Exp2Syn', 'tau1': 0.2, 'tau2': 1.8, 'e': 0.0},\n {'weight': 0.002, 'syntype': 'Exp2Syn', 'tau1': 0.1, 'tau2': 9.0, 'e': -80.0}],\n # parameters for spatial synaptic connectivity by populations X onto Y\n synapsePositionArguments=[\n {'section': ['apic', 'dend'],\n 'fun': [st.norm],\n 'funargs': [{'loc': 50.0, 'scale': 100.0}],\n 'funweights': [1.0]},\n {'section': ['soma', 'apic', 'dend'],\n 'fun': [st.norm],\n 'funargs': [{'loc': -100.0, 'scale': 100.0}],\n 'funweights': [1.0]}],\n # parameters for extrinsic synaptic input\n extSynapseParameters={'syntype': 'Exp2Syn', 'weight': 0.0002, 'tau1': 0.2, 'tau2': 1.8, 'e': 0.0},\n nu_ext=40., # external activation rate (spikes/s)\n n_ext=450, # number of extrinsic synapses \n nu_X=nu_X,\n )\n\n # make kernel predictions for connection from populations X='I' onto Y='E'\n H = kernel.get_kernel(\n probes=[probe],\n Vrest=Vrest, dt=dt, X='I', t_X=t_X, tau=tau,\n g_eff=g_eff)\n\n## Physical units\n\nNotes on physical units used in `LFPykernels`:\n\n- There are no explicit checks for physical units\n\n- Transmembrane currents are assumed to be in units of (nA)\n\n- Spatial information is assumed to be in units of (\u00b5m)\n\n- Voltages are assumed to be in units of (mV)\n\n- Extracellular conductivities are assumed to be in units of (S/m)\n\n- current dipole moments are assumed to be in units of (nA \u00b5m)\n\n- Magnetic fields are assumed to be in units of (nA/\u00b5m)\n\n- Simulation times are assumed to be in units of (ms) with step size \u2206t\n\n- Spike rates are assumed to be in units of (# spikes / \u2206t)\n\n## Documentation\n\nThe online Documentation of `LFPykernels` can be found here:\n<https://lfpykernels.readthedocs.io/en/latest>\n\n## Dependencies\n\n`LFPykernels` is implemented in Python and is written (and continuously tested) for `Python >= 3.7` (older versions may or may not work).\nThe main `LFPykernels` module depends on ``LFPy`` (<https://github.com/LFPy/LFPy>, <https://LFPy.readthedocs.io>).\n\nRunning all unit tests and example files may in addition require `py.test`, `matplotlib`,\n`LFPy`.\n\n## Installation\n\n### From development sources (<https://github.com/LFPy/LFPykernels>)\n\nInstall the current development version on <https://GitHub.com> using `git` (<https://git-scm.com>):\n\n git clone https://github.com/LFPy/LFPykernels.git\n cd LFPykernels\n python setup.py install # --user optional\n\nor using `pip`:\n\n pip install . # --user optional\n\nFor active development, link the repository location\n\n pip install -e . # --user optional\n\n### Installation of stable releases on PyPI.org (<https://www.pypi.org>)\n\nInstalling stable releases from the Python Package Index (<https://www.pypi.org/project/lfpykernels>):\n\n pip install lfpykernels # --user optional\n\nTo upgrade the installation using pip:\n\n pip install --upgrade --no-deps lfpykernels\n\n## Docker\n\nWe provide a Docker (<https://www.docker.com>) container recipe file with LFPykernels etc.\nTo get started, install Docker and issue either:\n\n # build Dockerfile from GitHub\n docker build -t lfpykernels https://raw.githubusercontent.com/LFPy/LFPykernels/main/Dockerfile\n docker run -it -p 5000:5000 lfpykernels\n\nor\n\n # build local Dockerfile (obtained by cloning repo, checkout branch etc.)\n docker build -t lfpykernels - < Dockerfile\n docker run -it -p 5000:5000 lfpykernels\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 lfpykernels - < Dockerfile 2>&1 | tee lfpykernels.log\n\nFor successful builds, 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/data -it -p 5000:5000 lfpykernels\n\nwhich mounts the present working dirctory (``$(pwd)``) to the ``/opt/data`` directory of the container.\nTry mounting the ``LFPykernels`` source directory for example (by setting ``source=\"<path-to-LFPykernels>\"``).\nVarious example files can then be found in the folder ``/opt/data/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/data/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\n## Acknowledgements\n\nThis work was supported by the European Union Horizon 2020 Research and\nInnovation Programme under Grant Agreement No. 785907 and No. 945539 Human Brain Project (HBP) SGA2 and SGA3.\nWe also acknowledge the use of Fenix Infrastructure resources,\nwhich are partially funded from the European Union\u2019s Horizon 2020 Research and Innovation Programme\nthrough the ICEI Project under the Grant Agreement No. 800858; The Helmholtz Alliance through the Initiative and\nNetworking Fund of the Helmholtz Association and the Helmholtz Portfolio theme Supercomputing\nand Modeling for the Human Brain; and The Excellence Strategy of the Federal Government and\nthe La\u00a8nder [G:(DE-82)EXS-PF-JARA-SDS005, G: (DE-82)EXS-SF-neuroIC002].\n",
"bugtrack_url": null,
"license": "",
"summary": "Causal spike-signal impulse response functions for finite-sized neuronal network models",
"version": "0.2.0",
"project_urls": {
"Homepage": "https://github.com/LFPy/LFPykernels"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1a042f32c258eba800eb77388ada0e004e15361f6fbc8aa8a5f357aef0ef312",
"md5": "0c246fa3e8f198384bfa0dd954126729",
"sha256": "6d4954e966ec31e5904517f77b6116c5b4ea1911922cfcb7c24adbe0b9ad6334"
},
"downloads": -1,
"filename": "LFPykernels-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0c246fa3e8f198384bfa0dd954126729",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 33001,
"upload_time": "2023-05-23T09:24:36",
"upload_time_iso_8601": "2023-05-23T09:24:36.249273Z",
"url": "https://files.pythonhosted.org/packages/d1/a0/42f32c258eba800eb77388ada0e004e15361f6fbc8aa8a5f357aef0ef312/LFPykernels-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7029de4f93448855a18a7d147b5b0d8663aabc2f02fa93e0ee624f9a5669d75b",
"md5": "d907b5a3b2bf363d6b1a2143c1a988c8",
"sha256": "5a48db219eb5636922627d4f32facc7bded1470604422e1950c42a69dd26f373"
},
"downloads": -1,
"filename": "LFPykernels-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "d907b5a3b2bf363d6b1a2143c1a988c8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 387095,
"upload_time": "2023-05-23T09:24:38",
"upload_time_iso_8601": "2023-05-23T09:24:38.535706Z",
"url": "https://files.pythonhosted.org/packages/70/29/de4f93448855a18a7d147b5b0d8663aabc2f02fa93e0ee624f9a5669d75b/LFPykernels-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-23 09:24:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "LFPy",
"github_project": "LFPykernels",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "lfpykernels"
}