=========
Tensorpac
=========
.. image:: https://github.com/EtienneCmb/tensorpac/workflows/Tensorpac/badge.svg
:target: https://github.com/EtienneCmb/tensorpac/workflows/Tensorpac
.. image:: https://travis-ci.org/EtienneCmb/tensorpac.svg?branch=master
:target: https://travis-ci.org/EtienneCmb/tensorpac
.. image:: https://circleci.com/gh/EtienneCmb/tensorpac/tree/master.svg?style=svg
:target: https://circleci.com/gh/EtienneCmb/tensorpac/tree/master
.. image:: https://ci.appveyor.com/api/projects/status/0arxtw05583gc3e2/branch/master?svg=true
:target: https://ci.appveyor.com/project/EtienneCmb/tensorpac/branch/master
.. image:: https://codecov.io/gh/EtienneCmb/tensorpac/branch/master/graph/badge.svg
:target: https://codecov.io/gh/EtienneCmb/tensorpac
.. image:: https://badge.fury.io/py/tensorpac.svg
:target: https://badge.fury.io/py/tensorpac
.. image:: https://pepy.tech/badge/tensorpac
:target: https://pepy.tech/project/tensorpac
.. image:: https://badges.gitter.im/EtienneCmb/tensorpac.svg
:target: https://gitter.im/EtienneCmb/tensorpac?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
.. figure:: https://github.com/EtienneCmb/tensorpac/blob/master/docs/source/picture/tp.png
:align: center
Description
-----------
Tensorpac is an Python open-source toolbox for computing Phase-Amplitude Coupling (PAC) using tensors and parallel computing for an efficient, and highly flexible modular implementation of PAC metrics both known and novel. Check out our `documentation <http://etiennecmb.github.io/tensorpac/>`_ for details.
Installation
------------
Tensorpac uses NumPy, SciPy and joblib for parallel computing. To get started, just open your terminal and run :
.. code-block:: console
$ pip install tensorpac
Code snippet & illustration
---------------------------
.. code-block:: python
from tensorpac import Pac
from tensorpac.signals import pac_signals_tort
# Dataset of signals artificially coupled between 10hz and 100hz :
n_epochs = 20 # number of trials
n_times = 4000 # number of time points
sf = 512. # sampling frequency
# Create artificially coupled signals using Tort method :
data, time = pac_signals_tort(f_pha=10, f_amp=100, noise=2, n_epochs=n_epochs,
dpha=10, damp=10, sf=sf, n_times=n_times)
# Define a Pac object
p = Pac(idpac=(6, 0, 0), f_pha='hres', f_amp='hres')
# Filter the data and extract pac
xpac = p.filterfit(sf, data)
# plot your Phase-Amplitude Coupling :
p.comodulogram(xpac.mean(-1), cmap='Spectral_r', plotas='contour', ncontours=5,
title=r'10hz phase$\Leftrightarrow$100Hz amplitude coupling',
fz_title=14, fz_labels=13)
p.show()
.. figure:: https://github.com/EtienneCmb/tensorpac/blob/master/docs/source/picture/readme.png
:align: center
Raw data
{
"_id": null,
"home_page": "http://etiennecmb.github.io/tensorpac/",
"name": "tensorpac",
"maintainer": "Etienne Combrisson",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "phase-amplitude coupling pac tensor oscillation meg eeg python",
"author": "Etienne Combrisson",
"author_email": "e.combrisson@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/34/4c/b7cab0522f4e9601a7e44d14d250801267d20848498426da875f53896bab/tensorpac-0.6.5.tar.gz",
"platform": "any",
"description": "=========\nTensorpac\n=========\n\n.. image:: https://github.com/EtienneCmb/tensorpac/workflows/Tensorpac/badge.svg\n :target: https://github.com/EtienneCmb/tensorpac/workflows/Tensorpac\n\n.. image:: https://travis-ci.org/EtienneCmb/tensorpac.svg?branch=master\n :target: https://travis-ci.org/EtienneCmb/tensorpac\n\n.. image:: https://circleci.com/gh/EtienneCmb/tensorpac/tree/master.svg?style=svg\n :target: https://circleci.com/gh/EtienneCmb/tensorpac/tree/master\n\n.. image:: https://ci.appveyor.com/api/projects/status/0arxtw05583gc3e2/branch/master?svg=true\n :target: https://ci.appveyor.com/project/EtienneCmb/tensorpac/branch/master\n\n.. image:: https://codecov.io/gh/EtienneCmb/tensorpac/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/EtienneCmb/tensorpac\n\n.. image:: https://badge.fury.io/py/tensorpac.svg\n :target: https://badge.fury.io/py/tensorpac\n\n.. image:: https://pepy.tech/badge/tensorpac\n :target: https://pepy.tech/project/tensorpac\n\n.. image:: https://badges.gitter.im/EtienneCmb/tensorpac.svg\n :target: https://gitter.im/EtienneCmb/tensorpac?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge\n\n\n.. figure:: https://github.com/EtienneCmb/tensorpac/blob/master/docs/source/picture/tp.png\n :align: center\n\nDescription\n-----------\n\nTensorpac is an Python open-source toolbox for computing Phase-Amplitude Coupling (PAC) using tensors and parallel computing for an efficient, and highly flexible modular implementation of PAC metrics both known and novel. Check out our `documentation <http://etiennecmb.github.io/tensorpac/>`_ for details.\n\nInstallation\n------------\n\nTensorpac uses NumPy, SciPy and joblib for parallel computing. To get started, just open your terminal and run :\n\n\n.. code-block:: console\n\n $ pip install tensorpac\n\nCode snippet & illustration\n---------------------------\n\n.. code-block:: python\n\n from tensorpac import Pac\n from tensorpac.signals import pac_signals_tort\n\n # Dataset of signals artificially coupled between 10hz and 100hz :\n n_epochs = 20 # number of trials\n n_times = 4000 # number of time points\n sf = 512. # sampling frequency\n\n # Create artificially coupled signals using Tort method :\n data, time = pac_signals_tort(f_pha=10, f_amp=100, noise=2, n_epochs=n_epochs,\n dpha=10, damp=10, sf=sf, n_times=n_times)\n\n # Define a Pac object\n p = Pac(idpac=(6, 0, 0), f_pha='hres', f_amp='hres')\n # Filter the data and extract pac\n xpac = p.filterfit(sf, data)\n\n # plot your Phase-Amplitude Coupling :\n p.comodulogram(xpac.mean(-1), cmap='Spectral_r', plotas='contour', ncontours=5,\n title=r'10hz phase$\\Leftrightarrow$100Hz amplitude coupling',\n fz_title=14, fz_labels=13)\n\n p.show()\n\n\n\n.. figure:: https://github.com/EtienneCmb/tensorpac/blob/master/docs/source/picture/readme.png\n :align: center\n\n\n",
"bugtrack_url": null,
"license": "BSD 3-Clause License",
"summary": "Tensor-based Phase-Amplitude Coupling",
"version": "0.6.5",
"project_urls": {
"Download": "https://github.com/EtienneCmb/tensorpac/archive/v0.6.5.tar.gz",
"Homepage": "http://etiennecmb.github.io/tensorpac/"
},
"split_keywords": [
"phase-amplitude",
"coupling",
"pac",
"tensor",
"oscillation",
"meg",
"eeg",
"python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4a748818a87c860f24dff6f22032cf3a6464d9aa7875db474fa676df0d919682",
"md5": "3789930d4648f4caa7636c3614c932c5",
"sha256": "579d65a0ba85400886dcf4074d5704d334ec9543bcf2d8cd2a6d9f63f37e57d0"
},
"downloads": -1,
"filename": "tensorpac-0.6.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3789930d4648f4caa7636c3614c932c5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 423638,
"upload_time": "2020-07-30T12:18:09",
"upload_time_iso_8601": "2020-07-30T12:18:09.030581Z",
"url": "https://files.pythonhosted.org/packages/4a/74/8818a87c860f24dff6f22032cf3a6464d9aa7875db474fa676df0d919682/tensorpac-0.6.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "344cb7cab0522f4e9601a7e44d14d250801267d20848498426da875f53896bab",
"md5": "c8ecf5c4bcbebf2cf877ae0b33dbc650",
"sha256": "a23511f13a38464a428504f890377b8664145b7c094dd5faa0adeb1fddfde248"
},
"downloads": -1,
"filename": "tensorpac-0.6.5.tar.gz",
"has_sig": false,
"md5_digest": "c8ecf5c4bcbebf2cf877ae0b33dbc650",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 388109,
"upload_time": "2020-07-30T12:18:12",
"upload_time_iso_8601": "2020-07-30T12:18:12.039772Z",
"url": "https://files.pythonhosted.org/packages/34/4c/b7cab0522f4e9601a7e44d14d250801267d20848498426da875f53896bab/tensorpac-0.6.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2020-07-30 12:18:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "EtienneCmb",
"github_project": "tensorpac",
"travis_ci": true,
"coveralls": true,
"github_actions": true,
"appveyor": true,
"circle": true,
"lcname": "tensorpac"
}