Skip to main content

PyBispectra logo

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

Metadata

Release files for pybispectra 1.3.2

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

Source distribution (sdist)

Source distribution for pybispectra 1.3.2
File Size Uploaded
pybispectra-1.3.2.tar.gz 14.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pybispectra 1.3.2
File Interpreter ABI Platform
pybispectra-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 MB

Release files / pybispectra-1.3.2.tar.gz

Download URL pybispectra-1.3.2.tar.gz
Size 14.9 MB
Tags Source
SHA-256 checksum
How to use checksums
beb04525097468901cf62e6a980d93bbca227cbda22f7fd1c63e43870a690ce6
BLAKE2b-256 checksum
How to use checksums
c39e7681f7e202b5afe289c090b3760b43872877cffa35b5db1fa52c48f0b326
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.

Transparency log

Release files / pybispectra-1.3.2-py3-none-any.whl

Download URL pybispectra-1.3.2-py3-none-any.whl
Size 61.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c5de1e92d9f4f7a3bcf69e74a8d35819c38b29b57b9423db1837383bcc958878
BLAKE2b-256 checksum
How to use checksums
7bd6086cc4df518e7ed88ddeeaeb59a40cc68bfef0260ac87c87013c950b280e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.0.1

2 release files

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