Skip to main content

Docs Status Build Status codecov

ppbig

Point Process

A modern C++ implementation of point process models for heart rate variability (HRV) analysis. Based on the MATLAB software by Riccardo Barbieri and Luca Citi (http://users.neurostat.mit.edu/barbieri/pphrv).

Key Features:

  • Fast C++ implementation with Python bindings
  • Multiple distribution models (Inverse Gaussian, Gaussian, LogNormal)
  • State-space regression and spectral analysis
  • Easy-to-use Python API with NumPy/SciPy integration
  • Cross-platform support (Linux, Windows, macOS)
  • Distributed as pre-built wheels via PyPI

Reference Papers:

Installation

From PyPI (Recommended)

pip install pointprocess

Supported platforms:

  • Linux (x86_64) - Wheels distributed via PyPI
  • Windows (x86_64) - Wheels distributed via PyPI
  • macOS (Apple Silicon) - Wheels distributed via PyPI
  • Python 3.9–3.13

Development Setup

All development work uses nox for consistency across platforms. First install system dependencies:

macOS (Homebrew):

brew install cmake boost eigen

Linux (Ubuntu/Debian):

sudo apt-get install -y cmake libboost-all-dev libeigen3-dev

Linux (Fedora/RHEL):

sudo dnf install -y cmake boost-devel eigen3-devel

Windows (Chocolatey):

choco install cmake boost-msvc-14.3 eigen

Then clone and use nox:

git clone https://github.com/andreabonvini/pointprocess.git
cd pointprocess
pipx install nox
nox

Common Development Tasks

All tasks use nox (no more bash scripts):

nox -s dev           # Set up development environment
nox -s build         # Build C++ extension
nox -s test          # Run test suite
nox -s lint          # Code quality checks (clang-format)
nox -s coverage      # Generate coverage report
nox -s docs          # Build Sphinx documentation
nox -s clean         # Clean build artifacts

Documentation

Full documentation available at pointprocess.readthedocs.io

Quick Start

Basic Usage

import numpy as np
import matplotlib.pyplot as plt
from pointprocess import (
    compute_single_regression,
    compute_full_regression,
    compute_spectral_analysis,
    Distributions,
)

# Load RR interval data (time between heartbeats in seconds)
rr = np.load("events.npy")
events = rr[75:301]

# Plot RR intervals
plt.plot(events[1:], 1000 * np.diff(events), "b")
plt.xlabel("Time [s]")
plt.ylabel("RR [ms]")
plt.show()

Single Regression

Fit a point process model to a fixed window of data:

result = compute_single_regression(
    events=events,
    ar_order=9,
    has_theta0=True,
    right_censoring=False,
    alpha=0.02,
    distribution=Distributions.InverseGaussian,
    max_iter=10000
)

# Access results
print(f"AR coefficients (θ_p): {result.thetap}")
print(f"Intercept (θ_0): {result.theta0}")
print(f"Shape parameter (κ): {result.kappa}")
print(f"Log-likelihood: {result.likelihood}")
print(f"Mean interval: {result.mean_interval}")

Spectral Analysis

# Compute power spectral density from model parameters
analysis = compute_spectral_analysis(
    thetap=result.thetap,
    mean_interval=result.mean_interval,
    variance=result.sigma ** 2
)

# Plot power spectral density
plt.figure(figsize=(10, 6))
plt.plot(analysis.frequencies, analysis.powers, "k", linewidth=0.8)
for pole in analysis.poles:
    plt.axvline(pole.frequency, color="r", linestyle="--", alpha=0.3)

plt.xlabel("Frequency [Hz]")
plt.ylabel("Power [ms²/Hz]")
plt.xlim(0, 0.5)
plt.show()

Full Regression (Time-Varying Analysis)

# Fit model across time with sliding window
result_full = compute_full_regression(
    events=rr,
    window_length=60.0,      # 60 second window
    delta=0.005,             # 5 ms step size
    ar_order=9,
    has_theta0=True,
    right_censoring=True,
    alpha=0.02,
    distribution=Distributions.InverseGaussian,
    max_iter=1000
)

# Convert to dictionary for easier access
d = result_full.to_dict()

# Plot time-varying mean
plt.figure(figsize=(12, 4))
plt.plot(d["Time"], d["Mu"], "b", linewidth=0.5, label="μ(t)")
plt.xlabel("Time [s]")
plt.ylabel("Mean Interval [s]")
plt.legend()
plt.show()

For complete examples with visualizations, see the Jupyter Notebook in examples/.

Contributing

We welcome contributions! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests: nox -s test
  5. Submit a pull request

License

MIT License - See LICENSE file for details.

Citation

If you use this library in your research, please cite:

@software{pointprocess2026,
  author = {Bonvini, Andrea},
  title = {Point Process: Heart Rate Variability Analysis Library},
  url = {https://github.com/andreabonvini/pointprocess},
  year = {2026}
}

Metadata

Release files for pointprocess 0.1.1

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

Built distributions (wheels)

Table of built distributions (wheels) for pointprocess 0.1.1
File
pointprocess-0.1.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
pointprocess-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
pointprocess-0.1.1-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
pointprocess-0.1.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
pointprocess-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
pointprocess-0.1.1-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
pointprocess-0.1.1-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
pointprocess-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details
pointprocess-0.1.1-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
pointprocess-0.1.1-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
pointprocess-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.28+ x86-64 Details
pointprocess-0.1.1-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
pointprocess-0.1.1-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
pointprocess-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.28+ x86-64 Details
pointprocess-0.1.1-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details

Total release size: 6.1 MB

Release files / pointprocess-0.1.1-cp313-cp313-win_amd64.whl

Download URL pointprocess-0.1.1-cp313-cp313-win_amd64.whl
Size 335.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
0e16e35c0f42a4bba3ac1b22e5110aa6953b2441820d6191aeaee4083d42083c
BLAKE2b-256 checksum
How to use checksums
b86c0fa951718a49e0ed7c6bd48653a9fa1441e9917aa187d8bd2cb622835227
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL pointprocess-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 501.3 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8bba46ad434c791245d4813e169f24b4395ad7c51232e081a34b6acba82dd0bd
BLAKE2b-256 checksum
How to use checksums
d99565f074b476af99bf059300da2d898ed7be151b201f2a9641f06110caf0b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL pointprocess-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Size 379.6 kB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e5d50906ffd93fe11b171a9bd564edd416cad25765036a5752777effcd399668
BLAKE2b-256 checksum
How to use checksums
c23dd3c18bda77ba91d2054bc94421bfe1265e1f63012e797d78dde5cc342e95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp312-cp312-win_amd64.whl

Download URL pointprocess-0.1.1-cp312-cp312-win_amd64.whl
Size 335.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
6573bce693bb752b566d91cb69a8da0cb1a3a3a497bb2b724df5a7f2b04c360c
BLAKE2b-256 checksum
How to use checksums
04d7d65af8dab23efb5383a9538896d6dee1746379d68df1fd7cd37f5b434e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL pointprocess-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 501.2 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
7b195aae442f7a8a6b2b4ded24677a5ff523eefe0b61930f114834d9b3e6f1ce
BLAKE2b-256 checksum
How to use checksums
6e5256e561dcff9b53c897b91017396ba3fbb9606ce113c626c7d7850f45f0e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL pointprocess-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Size 379.6 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ef9c2e7d12db6306da0e41665c0fc1feac949f65ccf0abdcd610d86fc1c94bfc
BLAKE2b-256 checksum
How to use checksums
1b7ed1b50f38241bd08d76d5a2a20aaa259e922bd4150276a1800d87880f83c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp311-cp311-win_amd64.whl

Download URL pointprocess-0.1.1-cp311-cp311-win_amd64.whl
Size 333.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
be919ceec6906f620a1ba568e2388952ac187e3ca391a921cc9fe34c7f6516e4
BLAKE2b-256 checksum
How to use checksums
b267c4441033f4f626a83deabdfc5ed702338b6cce0b64dbd81f5a4899c77cf2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL pointprocess-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 499.9 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
327dd80520d5a4973369a36d327fc78aeca13261ec379d97fa38928ae7ad1ac0
BLAKE2b-256 checksum
How to use checksums
848c4ddccb8269bdcb436ed582245e884ff937378ac7f3bb9bd8975a6c1a5fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL pointprocess-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Size 377.1 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3533ffc1ec8c596cd3dcc8dc949f9db6a429b56fcaba18cab09ee85be26ef875
BLAKE2b-256 checksum
How to use checksums
4cf8ebdb8ec0e2223ba53bb86a72dac7a70b589902fea1a7ed26be2c1119d11e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp310-cp310-win_amd64.whl

Download URL pointprocess-0.1.1-cp310-cp310-win_amd64.whl
Size 332.5 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
56c3d99486e96737948bf0233ca0a68e5e53fb8605792cc9bb14a2f48c2a4383
BLAKE2b-256 checksum
How to use checksums
5f498aa5cd32d32693ff462f1cb7cae1c0e788699d95fb6788eea5f932d80e53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl

Download URL pointprocess-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Size 498.3 kB
Tags CPython 3.10 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a51abfc261cb19654bda27148909b6d31de23aeaf7fd840b8246ae37524c7d1d
BLAKE2b-256 checksum
How to use checksums
b5805e901b1ba7ddc0a2e6eee4cf9dc24fff9e55e8a813a528ef7e32244b48b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL pointprocess-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Size 375.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1f9ebdafcc8a70bf34a9c9f1fc0b6bc889335abba10127fb4d6fd002ad0b01db
BLAKE2b-256 checksum
How to use checksums
980f78af49d52a947bf3882e452cbc8a0fdacaa5449b5f005dda33cde451843f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp39-cp39-win_amd64.whl

Download URL pointprocess-0.1.1-cp39-cp39-win_amd64.whl
Size 341.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
dbc083f76244344692c035e4c2bbf560728709af9fc9c8c2936cd93979facf00
BLAKE2b-256 checksum
How to use checksums
b8ee1c4d40bc8652e6e604925d4a4d3ba71bb15df3366ed9ec51c8699568ec06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl

Download URL pointprocess-0.1.1-cp39-cp39-manylinux_2_28_x86_64.whl
Size 498.8 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9f9dfe722d013a75ab7aa3276917a998512f4e7fde35bcedd87a760d4ebb4b0
BLAKE2b-256 checksum
How to use checksums
3ea2d06ef234d94173fe65237d8986bfc69c00e1b914716ad0b28d3826fa7cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release files / pointprocess-0.1.1-cp39-cp39-macosx_11_0_arm64.whl

Download URL pointprocess-0.1.1-cp39-cp39-macosx_11_0_arm64.whl
Size 376.0 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
5a6492c49d823b9492db79a3d84337a0ae734f238a5d1899db253985139d8b8c
BLAKE2b-256 checksum
How to use checksums
0be9b59213aceebc1aa54053df97e1d1e5f9415ce434ef5a16fae952727d56c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Apr 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

15 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