Skip to main content
.. -*- mode: rst -*-

.. image:: https://travis-ci.org/EtienneCmb/tensorpac.svg?branch=master
:target: https://travis-ci.org/EtienneCmb/tensorpac

.. image:: https://codecov.io/gh/EtienneCmb/tensorpac/branch/master/graph/badge.svg
:target: https://codecov.io/gh/EtienneCmb/tensorpac

Tensorpac
#########

.. 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. On top of that, we designed a modular implementation with a relatively large amount of parameters. Checkout the `documentation <http://etiennecmb.github.io/tensorpac/>`_for further details.

Installation
============

In a terminal, run :

.. code-block:: shell

git clone https://github.com/EtienneCmb/tensorpac.git tensorpac
cd tensorpac
pip setup.py install

Code snippet & illustration
===========================

.. code-block:: python

import matplotlib.pyplot as plt
from tensorpac.utils import PacSignals
from tensorpac import Pac

# Dataset of signals artificially coupled between 10hz and 100hz :
n = 100 # number of datasets
data, time = PacSignals(fpha=10, famp=100, noise=3, ndatasets=n, dpha=10, damp=10)

# Extract PAC :
p = Pac(idpac=(4, 0, 0), fpha=(2, 30, 1, 1), famp=(60, 150, 5, 5),
dcomplex='wavelet', width=12)
xpac, pval = p.filterfit(1024, data, data, axis=1, nperm=100)

# Plot your Phase-Amplitude Coupling :
p.comodulogram(xpac.mean(-1), title='Contour plot with 5 regions',
cmap='Spectral_r', plotas='contour', ncontours=5, vmin=60, vmax=300)

plt.show()


.. figure:: https://github.com/EtienneCmb/tensorpac/blob/master/docs/source/picture/readme.png
:align: center

Contributors
============

* `Etienne Combrisson <http://etiennecmb.github.io>`_
* Juan L.P. Soto
* `Karim Jerbi <www.karimjerbi.com>`_

Metadata

Release files for tensorpac 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tensorpac 0.5.0
File Size Uploaded Provenance Actions
Tensorpac-0.5.0.tar.gz 20.5 kB Without provenance Details for Tensorpac-0.5.0.tar.gz

Release files / Tensorpac-0.5.0.tar.gz

Download URL Tensorpac-0.5.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1f4d61e9f3ace854a1d951ecc440c9cdee8941ac9321f1dc060bb412cacc3e11
BLAKE2b-256 checksum
How to use checksums
6d69261e538ab1368be1e921ebba03e6ad67cf80190b1c6707c9d182a92b49f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for tensorpac 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page