{ "info": { "author": "Etienne Ackermann", "author_email": "era3@rice.edu", "bugtrack_url": null, "classifiers": [], "description": "=====\nNelpy\n=====\n.. image:: https://zenodo.org/badge/77548623.svg\n :target: https://zenodo.org/badge/latestdoi/77548623\n \nNeuroelectrophysiology object model, data exploration, and analysis in Python.\n\nOverview\n========\nNelpy (**N**\\ euro\\ **el**\\ ectro\\ **p**\\ hysiolog\\ **y**) is an open source package for analysis of neuroelectrophysiology data. Nelpy defines a number of data objects to make it easier to work with electrophysiology (ephys) data, and although it was originally designed for use with extracellular recorded data, it can be used much more broadly. Nelpy is intended to make interactive data analysis and exploration of these ephys data easy, by providing several convenience functions and common visualizations that operate directly on the nelpy objects.\n\nMore specifically, the functionality of this package includes:\n\n- several container objects (``SpikeTrain``, ``BinnedSpikeTrain``, ``AnalogSignal``, ``EpochArray``, ...) with nice human-readable ``__repr__`` methods\n- powerful ways to interact with the data in the container objects\n- hidden Markov model analysis of neural activity\n- basic data exploration and visualization operating directly on the core nelpy objects\n- and much more\n\nSupport\n=======\nThis work was supported by the National Science Foundation (CBET-1351692 and IOS-1550994) and the Human Frontiers Science Program (RGY0088). Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.\n\nQuick examples\n==============\n\nLet's give it a try. Create a ``SpikeTrainArray``:\n\n.. code-block:: python\n\n import nelpy as nel # main nelpy imports\n import nelpy.plotting as npl # optional plotting imports\n spike_times = np.array([1, 2, 4, 5, 10])\n st = nel.SpikeTrainArray(spike_times)\n\nDo something:\n\n.. code-block:: python\n\n >>> print(st.n_spikes) # print out how many spikes there are in st\n 5\n\n >>> print(st.supportn_spikes) # print out the underlying EpochArray on which st is defined\n of duration 9 seconds\n\n >>> npl.raster(st) # plots the spike raster\n\n\nAs a more representative example of what nelpy can be used for, consider the estimation of\nplace fields (spatial tuning curves) of CA1 units while an animal runs on a linear track.\n\nEstimating the place fields can be a complicated affair, and roughly involves the following steps:\n\n1. assume we have position data and spike data available\n2. linearize the environment (and position data), if desired\n3. estimate the running velocity from the position data\n4. smooth the velocity estimates, since numerical differentiation is inherently noisy (and our measurements are imprecise)\n5. identify epochs where the animal was running, and where the animal was resting\n6. count the number of spikes from each unit, in each spatial bin of the environment, during run behavior\n7. determine how long the animal spent in each spatial bin (while running)\n8. estimate a firing rate within each spatial bin, by normalizing the number of observed spikes by the time spent in that spatial bin\n9. visualize the estimated tuning curves, and evaluate how well the tuning curves can be used to decode the animal's position\n10. ...\n\n.. class:: no-web\n\n .. image:: https://raw.githubusercontent.com/nelpy/nelpy/develop/.placefields.png\n :alt: nelpy-promo-pic\n :width: 100%\n :align: center\n\nNelpy makes it easy to do all of the above, to interact with the ephys data, and to visualize the results.\n\nTo see the full code that was used to generate the figures above, take a look at the `linear track example analysis `_.\n\nGetting started\n===============\nThe best way to get started with using ``nelpy`` is probably to take a look at\nthe `tutorials `_ (a work-in-progress) and\n`example analyses `_.\n\nThe tutorials are still pretty bare-bones, but will hopefully be expanded soon!\n\nInstallation\n============\n\nThe easiest way to install nelpy is to use ``pip``. From the terminal, run:\n\n.. code-block:: bash\n\n $ pip install nelpy\n\nAlternatively, you can install the latest version of nelpy by running the following commands:\n\n.. code-block:: bash\n\n $ git clone https://github.com/nelpy/nelpy.git\n $ cd nelpy\n $ python setup.py [install, develop]\n\nwhere the ``develop`` argument should be used if you want to modify the code.\n\nA weak prerequisite for installing nelpy is a modified version of `hmmlearn `_. This requirement is weak, in the sense that installation will complete successfully without it, and most of nelpy can also be used without any problems. However, as soon as any of the hidden Markov model (HMM) functions are used, you will get an error if the correct version of ``hmmlearn`` is not installed. To make things easier, there is a handy 64-bit Windows wheel in the `hmmlearn directory `_ of this repository. Installation on Linux/Unix should be almost trivial.\n\nRelated work and inspiration\n============================\nNelpy drew heavy inspiration from the ``python-vdmlab`` package (renamed to ``nept``)\nfrom the van der Meer lab at Dartmouth College (https://github.com/vandermeerlab),\nwhich was created by Emily Irvine (https://github.com/emirvine). It is\nalso inspired by the neuralensemble.org NEO project (http://neo.readthedocs.io).\n\n**Short history:** Etienne A started the nelpy project for two main reasons, namely\n\n1. he wanted / needed a ``BinnedSpikeTrain`` object for hidden Markov model analysis that wasn't (at the time) avaialable in ``neo`` or ``python-vdmlab``, and\n2. he fundamentally wanted to add \"support\" attributes to all the container objects. Here \"support\" should be understood in the mathematical sense of \"domain of definition\", whereas the mathematical support technically would not include some elements for which the function maps to zero. This is critical for spike trains, for example, where it is important to differentiate \"no spike at time t\" from \"no record at time t\".\n\nScope of this work\n==================\nThe nelpy object model is expected to be quite similar to the python-vdmlab object\nmodel, which in turn has significant overlap with neuralensemble.org's neo\nmodel. However, the nelpy object model extends the former by making binned data\nfirst class citizens, and by changing the API for indexing and extracting subsets\nof data, as well as making \"functional support\" an integral part of the model. It\n(nelpy) is currently simpler and less comprehensive than neo, and specifically lacks in\nterms of physical units and complex object hierarchies and nonlinear relationships.\nHowever, nelpy again makes binned data a core object, and nelpy further aims to\nadd additional analysis code including filtering, smoothing, position analysis,\nsubsampling, interpolation, spike rate estimation, spike generation / synthesis,\nripple detection, Bayesian decoding, and so on. In short, nelpy is more than just\nan object model, but the nelpy core is designed to be a flexible, readable, yet\npowerful object model for neuroelectrophysiology.\n\nWhere\n=====\n\n=================== ========================================================\n download https://pypi.python.org/pypi/nelpy\n tutorials https://github.com/nelpy/tutorials\n example analyses https://github.com/nelpy/example-analyses\n docs coming soon! summer 2018\n code https://github.com/nelpy/nelpy\n=================== ========================================================\n\nCite\n====\n\nIf you use nelpy in your research, please cite it:\n\n.. code-block::\n\n @misc{nelpy17,\n author = {Etienne Ackermann},\n title = {Nelpy: Neuroelectrophysiology object model, data exploration, and analysis in Python},\n howpublished = {\\url{https://github.com/nelpy/nelpy/}},\n year = {2017--2018}\n }\n\nLicense\n=======\n\nNelpy is distributed under the MIT license. See the `LICENSE `_ file for details.\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/nelpy/nelpy/tarball/0.2.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nelpy/nelpy/", "keywords": "electrophysiology neuroscience data analysis", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "nelpy", "package_url": "https://pypi.org/project/nelpy/", "platform": "any", "project_url": "https://pypi.org/project/nelpy/", "project_urls": { "Download": "https://github.com/nelpy/nelpy/tarball/0.2.1", "Homepage": "https://github.com/nelpy/nelpy/" }, "release_url": "https://pypi.org/project/nelpy/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Neuroelectrophysiology object model and data analysis in Python.", "version": "0.2.1" }, "last_serial": 4791638, "releases": { "0.0.6": [ { "comment_text": "", "digests": { "md5": "70b1958af7d9001f8fd862434824b840", "sha256": "bee27691416ebfde86205095b072a4be832038c56f0d273201cfe636019d4c9a" }, "downloads": -1, "filename": "nelpy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "70b1958af7d9001f8fd862434824b840", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18633, "upload_time": "2017-01-13T20:52:42", "url": "https://files.pythonhosted.org/packages/3b/ff/5bb60457e0a23f37b4c53c88575f62a586b21318f2443dfabe7ca3d94a38/nelpy-0.0.6.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "69080372aa7154094491d3de0aa5729e", "sha256": "a2dfd75d0ba5ecb55cf42049abed65cb2b00edf717eda04b2c4c3e12a6ac95f2" }, "downloads": -1, "filename": "nelpy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "69080372aa7154094491d3de0aa5729e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17597, "upload_time": "2017-01-16T16:57:35", "url": "https://files.pythonhosted.org/packages/e5/39/e7d9514685bb2c7ec65d29b55cc5ca5528e6fa789b15e4159df27d8a7744/nelpy-0.0.8.tar.gz" } ], "0.0.93": [ { "comment_text": "", "digests": { "md5": "a2d92a8d4a14e56da8cbc453d9b12bf2", "sha256": "5ce92c90ac38c1bbd85f0fbc3826c60f1f24083aaa2e4d523af465f56250317f" }, "downloads": -1, "filename": "nelpy-0.0.93.tar.gz", "has_sig": false, "md5_digest": "a2d92a8d4a14e56da8cbc453d9b12bf2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22622, "upload_time": "2017-01-20T20:35:52", "url": "https://files.pythonhosted.org/packages/f5/4b/67e9197abbfcb4d548e7c616d0e238569ef4d6e49030dfc34da29b74de0c/nelpy-0.0.93.tar.gz" } ], "0.0.94": [ { "comment_text": "", "digests": { "md5": "7b477b29a41c7de3e60e1bfce64fc4ab", "sha256": "f7f911236a5299515ab80ee5cb12d02f4a7780fe632d3413514ef9a6485adc05" }, "downloads": -1, "filename": "nelpy-0.0.94.tar.gz", "has_sig": false, "md5_digest": "7b477b29a41c7de3e60e1bfce64fc4ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22664, "upload_time": "2017-01-20T20:54:02", "url": "https://files.pythonhosted.org/packages/48/7c/01ae632d9807cab316423ee92d25b352ac0ea628bf302ed5becf9f41466f/nelpy-0.0.94.tar.gz" } ], "0.0.95": [ { "comment_text": "", "digests": { "md5": "4776c1f79b60de455f8028c6d0f52839", "sha256": "a38fa7351922cb033779b0d892c9ecc01b275fead6bc4a5348f4ea387a612666" }, "downloads": -1, "filename": "nelpy-0.0.95.tar.gz", "has_sig": false, "md5_digest": "4776c1f79b60de455f8028c6d0f52839", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34099, "upload_time": "2017-01-30T21:17:36", "url": "https://files.pythonhosted.org/packages/ed/d5/6e09c3eb98c4195d5001bc1a8ac5069dc85bba872f470ff8de30b1377993/nelpy-0.0.95.tar.gz" } ], "0.0.96": [ { "comment_text": "", "digests": { "md5": "a8adac9a1d7bffcf1e1f752a200ca07f", "sha256": "ddf2a94e51d6ca58c219cd2021c23053346c5c1c6e6417c4685cdeffad7e376f" }, "downloads": -1, "filename": "nelpy-0.0.96.tar.gz", "has_sig": false, "md5_digest": "a8adac9a1d7bffcf1e1f752a200ca07f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47689, "upload_time": "2017-03-08T21:20:53", "url": "https://files.pythonhosted.org/packages/62/5c/c8a0f9f7606ab0ef3fa18388d23e5400fd7c4c99f056eb0e741af0777ba4/nelpy-0.0.96.tar.gz" } ], "0.0.97": [ { "comment_text": "", "digests": { "md5": "8cbb23fa0e48fd7f5f8963511c6dd8a2", "sha256": "b441bfbf26876dfb5a83fbf49568d572d7508f533f2fc81a2d4afb563efb912c" }, "downloads": -1, "filename": "nelpy-0.0.97.tar.gz", "has_sig": false, "md5_digest": "8cbb23fa0e48fd7f5f8963511c6dd8a2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 72017, "upload_time": "2017-04-05T21:01:53", "url": "https://files.pythonhosted.org/packages/75/26/f0b421dad673f42aa03c2c98b3b33e4d24ccac5ac377d0b51e03a2f898e9/nelpy-0.0.97.tar.gz" } ], "0.0.99": [ { "comment_text": "", "digests": { "md5": "4b01de9c9ddab351b7f7c302c814f793", "sha256": "ea6ff28f77c4fe975d16a1c2b06e11508665e1f6c103f3f4d8360f994e5b4207" }, "downloads": -1, "filename": "nelpy-0.0.99.tar.gz", "has_sig": false, "md5_digest": "4b01de9c9ddab351b7f7c302c814f793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 145304, "upload_time": "2017-08-10T17:23:59", "url": "https://files.pythonhosted.org/packages/42/75/8092a50e33fbb66c791847875142ce614dacf37152c11a7ffc18b68ba31e/nelpy-0.0.99.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "3566fc518cfbe8e4a3beb7dfbf714fba", "sha256": "65c3450921b97fa21e751e21ba7e8b272bf34350ab79fbc04f26ef8f098b01ae" }, "downloads": -1, "filename": "nelpy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3566fc518cfbe8e4a3beb7dfbf714fba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 146165, "upload_time": "2017-08-14T02:32:14", "url": "https://files.pythonhosted.org/packages/91/c2/fe9bf4fb30eb255aa95e1e54431ad700308278d82c753eb627eca7301974/nelpy-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b65586b2de2ae085e8b9224f9ff26be0", "sha256": "107a3c55a87457a30e1a52f3c9f3d5aa1d9e0b4b5d76ca6859730877402f5d89" }, "downloads": -1, "filename": "nelpy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b65586b2de2ae085e8b9224f9ff26be0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 156019, "upload_time": "2017-11-13T22:41:33", "url": "https://files.pythonhosted.org/packages/89/c5/607c3be99ca6e492b77632abebad6b4935224994d7b270e0fd96ceda48c3/nelpy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "84a4652d1cfaafa5707b30f63b77786a", "sha256": "40e0f4d776656e60bbad66d83e30488b3ad2490bed894125e9d9d7f1392e559c" }, "downloads": -1, "filename": "nelpy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "84a4652d1cfaafa5707b30f63b77786a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 165929, "upload_time": "2018-04-17T17:47:53", "url": "https://files.pythonhosted.org/packages/93/0e/702b69e0fb6024357264f50595b35f2cd3cbadff776662cd5e90cd6c8d9e/nelpy-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "31af8a30622fe12cf1597c60882f6951", "sha256": "04e6dc0bbe6858ab0c55d116adb12d68f0f54e55551b83274f271742e44aa4bd" }, "downloads": -1, "filename": "nelpy-0.1.3.tar.gz", "has_sig": false, "md5_digest": "31af8a30622fe12cf1597c60882f6951", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182474, "upload_time": "2018-05-17T20:10:04", "url": "https://files.pythonhosted.org/packages/f6/88/4515e5f6c164bb1c247d1a4fe9387fb218606ee0e7c17c107be57c297f20/nelpy-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1dcdd08a8cc7d8ed934fab929a3190a8", "sha256": "654a7bd651562c4ff0d63fc0327c8b25d4f02091a0a7840c1314b20af1b8d8a0" }, "downloads": -1, "filename": "nelpy-0.2.0.tar.gz", "has_sig": false, "md5_digest": "1dcdd08a8cc7d8ed934fab929a3190a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 236223, "upload_time": "2018-09-08T01:34:05", "url": "https://files.pythonhosted.org/packages/b0/a1/14a88eec3adec9ea6a8e07123a83ded8149c900be64a7d5bfe0899c642f9/nelpy-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f353a3ec3d24215f4a1481fd563016e4", "sha256": "01b5a7d673b020b67c5b527051485602c73520ec96f345d31b0b80012bf0d165" }, "downloads": -1, "filename": "nelpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f353a3ec3d24215f4a1481fd563016e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224701, "upload_time": "2019-02-07T15:49:19", "url": "https://files.pythonhosted.org/packages/ad/3c/c2720971ab977b5965c4fc823ab39e0aa3fb52159348402e88ac07368661/nelpy-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f353a3ec3d24215f4a1481fd563016e4", "sha256": "01b5a7d673b020b67c5b527051485602c73520ec96f345d31b0b80012bf0d165" }, "downloads": -1, "filename": "nelpy-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f353a3ec3d24215f4a1481fd563016e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 224701, "upload_time": "2019-02-07T15:49:19", "url": "https://files.pythonhosted.org/packages/ad/3c/c2720971ab977b5965c4fc823ab39e0aa3fb52159348402e88ac07368661/nelpy-0.2.1.tar.gz" } ] }