Skip to main content

Estimation of phase-amplitude coupling (PAC) in neural time series, including with driven auto-regressive (DAR) models.

Project description

Build Status Test coverage Python27 Python36

This package provides tools to estimate phase-amplitude coupling (PAC) in neural time series.

In particular, it implements the driven auto-regressive (DAR) models presented in the reference below [Dupre la Tour et al. 2017].

Read more in the documentation.

Installation

To install pactools, you first need to install its dependencies:

pip install numpy scipy matplotlib scikit-learn

To enable all features, you will also need to install optional packages:

pip install mne h5py

Then install pactools with one of the following two commands:

  • Development version:

    pip install git+https://github.com/pactools/pactools.git#egg=pactools
  • Latest stable version:

    pip install pactools

To upgrade, use the --upgrade flag provided by pip.

To check if everything worked fine, you can do:

python -c 'import pactools'

and it should not give any error messages.

Phase-amplitude coupling (PAC)

Among the different classes of cross-frequency couplings, phase-amplitude coupling (PAC) - i.e. high frequency activity time-locked to a specific phase of slow frequency oscillations - is by far the most acknowledged. PAC is typically represented with a comodulogram, which shows the strenght of the coupling over a grid of frequencies. Comodulograms can be computed in pactools with more than 10 different methods.

Driven auto-regressive (DAR) models

One of the method is based on driven auto-regressive (DAR) models. As this method models the entire spectrum simultaneously, it avoids the pitfalls related to incorrect filtering or the use of the Hilbert transform on wide-band signals. As the model is probabilistic, it also provides a score of the model goodness of fit via the likelihood, enabling easy and legitimate model selection and parameter comparison; this data-driven feature is unique to such model-based approach.

We recommend using DAR models to estimate PAC in neural time-series. More detail in [Dupre la Tour et al. 2017].

Acknowledgment

This work was supported by the ERC Starting Grant SLAB ERC-YStG-676943 to Alexandre Gramfort, the ERC Starting Grant MindTime ERC-YStG-263584 to Virginie van Wassenhove, the ANR-16-CE37-0004-04 AutoTime to Valerie Doyere and Virginie van Wassenhove, and the Paris-Saclay IDEX NoTime to Valerie Doyere, Alexandre Gramfort and Virginie van Wassenhove,

Cite this work

If you use this code in your project, please cite [Dupre la Tour et al. 2017]:

@article{duprelatour2017nonlinear,
    author = {Dupr{\'e} la Tour, Tom and Tallot, Lucille and Grabot, Laetitia and Doy{\`e}re, Val{\'e}rie and van Wassenhove, Virginie and Grenier, Yves and Gramfort, Alexandre},
    journal = {PLOS Computational Biology},
    publisher = {Public Library of Science},
    title = {Non-linear auto-regressive models for cross-frequency coupling in neural time series},
    year = {2017},
    month = {12},
    volume = {13},
    url = {https://doi.org/10.1371/journal.pcbi.1005893},
    pages = {1-32},
    number = {12},
    doi = {10.1371/journal.pcbi.1005893}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pactools-0.3.tar.gz (67.9 kB view details)

Uploaded Source

Built Distribution

pactools-0.3-py3-none-any.whl (82.8 kB view details)

Uploaded Python 3

File details

Details for the file pactools-0.3.tar.gz.

File metadata

  • Download URL: pactools-0.3.tar.gz
  • Upload date:
  • Size: 67.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for pactools-0.3.tar.gz
Algorithm Hash digest
SHA256 473314e9feb2a1be69b46d6b7d6f7381ecb1c8242f542b52914424858c2755eb
MD5 cc2e842ea710f70313a12d76c7864f18
BLAKE2b-256 2a62b4237deeb4d2aefd5dc94ac89d54ff26a15b9d7538454093819f87f1f7c6

See more details on using hashes here.

File details

Details for the file pactools-0.3-py3-none-any.whl.

File metadata

  • Download URL: pactools-0.3-py3-none-any.whl
  • Upload date:
  • Size: 82.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

File hashes

Hashes for pactools-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f72973a0fc1c9e760933fd21105a55229cd0210b71c0fcda2b11d4b61985059
MD5 61eadd7dc102a7dd091c085fd064cf03
BLAKE2b-256 863d77f4e710d8ae1c00efa98ed4cd9aaeb53bcdc80c71cae87a61889bbc7f15

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page