A Python signal processing package for computing spectral-domain and time-domain interactions using the bispectrum.
Project description
A Python signal processing package for computing spectral- and time-domain interactions using the bispectrum.
This package provides the tools for computing phase-amplitude coupling, time delay estimation, and wave shape features using the bispectrum and bicoherence. Additional tools for computing amplitude-amplitude coupling, phase-phase coupling, and spatio-spectral filters are also provided.
Parallel processing and Numba optimisation are implemented to reduce computation times.
Analysis of phase-amplitude coupling, time delays, and non-sinusoidal waveshape provide important insights into electrophysiology data, but traditional analysis methods have critical limitations. In contrast, the bispectrum - the Fourier transform of the third order moment - offers approaches to perform such analyses whilst overcoming many of the limitations of traditional methods.
Installation & Requirements:
Install the package into the desired environment using pip: pip install pybispectra
or conda: conda install -c conda-forge pybispectra
More information on the installation page.
Use:
To get started with the toolbox, check out the documentation and examples.
For instance, given some epoched time series, data, phase-amplitude coupling can be computed as:
from pybispectra import PAC, compute_fft
coeffs, freqs = compute_fft(data, sampling_freq) # compute spectral coeffs
pac = PAC(coeffs, freqs, sampling_freq) # initialise coupling object
pac.compute() # compute phase-amplitude coupling
pac_results = pac.results # extract results
pac_results.plot() # plot results
Contributing & Development:
If you encounter issues with the package, want to suggest improvements, or have made any changes which you would like to see officially supported, please refer to the development page. A unit test suite is included and must be expanded where necessary to validate any changes.
Citing:
If you use this toolbox in your work, please include the following citation:
Binns, TS, Pellegrini, F, Jurhar, T, Nguyen, TD, Köhler, RM, & Haufe, S (2025). PyBispectra: A toolbox for advanced electrophysiological signal processing using the bispectrum. Journal of Open Source Software. DOI: 10.21105/joss.08504
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pybispectra-1.3.1.tar.gz.
File metadata
- Download URL: pybispectra-1.3.1.tar.gz
- Upload date:
- Size: 14.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02f964282005fbf2b92a4248e1330fc479ca4242174c141100e6e3db9572e92b
|
|
| MD5 |
da0db5673e787060a50ef5ed00fbc0b6
|
|
| BLAKE2b-256 |
8ae2a80c6aac73176d5943abc1ebd031980abef1242cd9ad9b79c3c923cf37ec
|
Provenance
The following attestation bundles were made for pybispectra-1.3.1.tar.gz:
Publisher:
release.yml on braindatalab/PyBispectra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybispectra-1.3.1.tar.gz -
Subject digest:
02f964282005fbf2b92a4248e1330fc479ca4242174c141100e6e3db9572e92b - Sigstore transparency entry: 1243579809
- Sigstore integration time:
-
Permalink:
braindatalab/PyBispectra@6ad6a6cd12b47132ae067d51eeb6c71edc7e3746 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/braindatalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ad6a6cd12b47132ae067d51eeb6c71edc7e3746 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pybispectra-1.3.1-py3-none-any.whl.
File metadata
- Download URL: pybispectra-1.3.1-py3-none-any.whl
- Upload date:
- Size: 61.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b35d361d9984f8e483cf82e80729083e2da2891774b48a253793f4d36ee563
|
|
| MD5 |
edd93de2f34971100b1832f5821fabad
|
|
| BLAKE2b-256 |
8d2c03692b60ba7764fd1d0b10418831535abd809fc0f8ccd41c1297d3411c01
|
Provenance
The following attestation bundles were made for pybispectra-1.3.1-py3-none-any.whl:
Publisher:
release.yml on braindatalab/PyBispectra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pybispectra-1.3.1-py3-none-any.whl -
Subject digest:
71b35d361d9984f8e483cf82e80729083e2da2891774b48a253793f4d36ee563 - Sigstore transparency entry: 1243579834
- Sigstore integration time:
-
Permalink:
braindatalab/PyBispectra@6ad6a6cd12b47132ae067d51eeb6c71edc7e3746 -
Branch / Tag:
refs/tags/v1.3.1 - Owner: https://github.com/braindatalab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6ad6a6cd12b47132ae067d51eeb6c71edc7e3746 -
Trigger Event:
release
-
Statement type: