Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrkrd/thorns
Spike analysis software
https://github.com/mrkrd/thorns
action-potentials computational-neuroscience psth python spike-trains spikes
Last synced: 1 day ago
JSON representation
Spike analysis software
- Host: GitHub
- URL: https://github.com/mrkrd/thorns
- Owner: mrkrd
- License: gpl-3.0
- Created: 2014-06-23T14:10:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T22:27:31.000Z (over 2 years ago)
- Last Synced: 2024-10-07T22:11:32.757Z (about 1 month ago)
- Topics: action-potentials, computational-neuroscience, psth, python, spike-trains, spikes
- Language: Python
- Size: 828 KB
- Stars: 17
- Watchers: 3
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: COPYING.txt
Awesome Lists containing this project
README
thorns and waves
================::
__|________|_____|_|_|___|_____|____||_____|_____|_____|____|_____|___||______
_|_______________________|______|_________|_______|_____|____|__|________|_|__
_____|___|__|_____|_______|____|_________________________|__|_________|_______
___|_______|_____|______|_____|_______|__|___|________|______|___|____________
__|__|_______|_____|__|___|______|________|______|______|_____|_______THORNS__With *thorns* you can analyze and display `spike trains`_ generated by
neurons. It can be useful for the analysis of experimental and
simulation data using Python. For example, you can easily calculate
peristimulus time histogram (PSTH), interspike time histogram (ISIH),
vector strength (VS), entrainment and visualize action potentials with
raster plot.*waves* is a submodule with some useful signal processing and
generation functions, e.g. generate ramped tone, amplitude modulation
tone, FFT filter, set level (dB_SPL).The software was originally developed during my PhD in the group of
`Werner Hemmert`_ at the TUM. It is oriented towards auditory
research, but it could be easily extended... _`spike trains`: https://en.wikipedia.org/wiki/Spike_train
.. _`Werner Hemmert`: https://www.ei.tum.de/en/bai/home/Usage
-----Don't forget to check our IPython Notebook DEMO_ and scripts in the
examples_ directory!Initialize and load spike trains::
import thorns as th
from thorns.datasets import load_anf_zilany2014spike_trains = load_anf_zilany2014()
Calculate vector strength::
th.vector_strength(spike_trains, freq=1000)
Raster plot::
th.plot_raster(spike_trains)
th.show()Generate and plot AM tone::
import thorns.waves as wv
sound = wv.amplitude_modulated_tone(
fs=48e3,
fm=100,
fc=1e3,
m=0.7,
duration=0.1,
)wv.plot_signal(sound, fs=48e3)
wv.show()
You can also browse the API documentation at
https://pythonhosted.org/thorns/.. _DEMO: https://github.com/mrkrd/thorns/blob/master/examples/thorns_demo.ipynb
.. _examples: examplesFeatures
--------- Analyzes and displays spike trains
- Uses pandas.DataFrame as the main data container (spike trains,
results)
- Handy signal processing and generating functions: ``thorns.waves``
- Map implementation with various backend (also parallel) and caching:
``thorns.util.map()``
- Dumpdb: quickly dump ``map()``'s results in one script and load from
another one: ``thorns.util.dumpdb()``, ``thorns.util.loaddb()``
- Pure PythonInstallation
------------In order to use *thorns*, you'll need to install the following
dependencies first:- Python (2.7)
- Numpy
- Scipy
- Pandas
- PyTables / tables
- Matplotlib- py-notify (optional, enables notifications)
Next, type in your command line::
pip install thorns
Contribute
----------- Open tasks: TODO.org_ (best viewed in Emacs org-mode)
- Issue Tracker: https://github.com/mrkrd/thorns/issues
- Source Code: https://github.com/mrkrd/thorns.. _TODO.org: TODO.org
License
-------The project is licensed under the GNU General Public License v3 or
later (GPLv3+).