Skip to main content

PATminton — a GPU-accelerated Python toolbox for 3D photoacoustic tomography

Documentation

patminton — GPU-Accelerated 3D Photoacoustic Tomography

PATminton: PAT Models ImplemeNTatiON.

Scalable GPU implementations of 3D photoacoustic tomography (PAT) models that account for the transducer spatial impulse response. The forward and adjoint operators are computed on the fly as matrix-vector products, so iterative image reconstruction never stores the system matrix. CGLS, L-BFGS-B, PGD and Chambolle-Pock TV solvers are built on top of them.

For a 200³ grid observed by 11 520 transducer positions with 1000 time samples, the dense system matrix would occupy 200³ × 11 520 × 1000 × 8 B ≈ 737 TB in double precision; patminton applies it and its adjoint on the fly on the GPU instead.

Installation

pip install patminton

Requirements: a CUDA-capable NVIDIA GPU (compute capability ≥ 7.0), an NVIDIA driver ≥ 525, and Python ≥ 3.9. On Linux x86-64 this installs a prebuilt wheel built with CUDA 12.8, which needs no CUDA toolkit and works with both CUDA 12 and CUDA 13 drivers and PyTorch builds. Its cuFFT dependency (libcufft.so.11) is installed from PyPI.

Installing from source instead requires the CUDA toolkit (nvcc ≥ 11 on PATH), which compiles the library for every supported architecture. To target a specific set of GPUs (e.g. V100 + A100 + RTX 30xx):

PATMINTON_CUDA_ARCH="70;80;86" pip install --no-binary patminton patminton

Quick example

import torch
from patminton import PAT, translation_rotation_system, least_squares_CG

infos = translation_rotation_system(
    transducer_radius=25e-3, transducer_height=7.5e-3,
    transducer_width=0.250e-3, transducer_pitch=0.298e-3,
    transducer_nbr_elements=64, transducer_wavelength=1500/5e6,
    grid_size=10e-3,
)

pat = PAT(200, 200, 200, 5e-3, 5e-3, 5e-3,
          nT=1024, tStart=12.5e-6, dt=16e-9, c=1500.0,
          mode='cylinder_lut', infos_transducers=infos)

p = torch.zeros((200, 200, 200), dtype=torch.float64, device='cuda')
p[100, 100, 100] = 1.0

s = pat @ p                     # forward:  signals from initial pressure
p_bp = pat.T @ s                # adjoint:  back-propagation

u, *_ = least_squares_CG(pat, s, M_inv=None, max_iter=50, lam=1e-4)

Documentation

patminton.readthedocs.io — installation, quickstart, physical and mathematical model, transducer models, reconstruction algorithms and key parameters.

To preview it locally:

pip install -r docs/requirements.txt
mkdocs serve      # live preview on http://127.0.0.1:8000

Tests

pip install .[test]
pytest              # CPU tests (no GPU needed)
pytest -m gpu       # operator tests on a CUDA GPU

Citation

If you use this package, please cite:

Trung-Thai Do, Paul Escande, Caroline Chaux, Jérôme Gateau, Hwee Kuan Lee — "Scalable implementations of photoacoustic tomography models accounting for transducers spatial impulse response", 2026.

Metadata

Release files for patminton 0.1.1

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

Source distribution (sdist)

Source distribution for patminton 0.1.1
File Size Uploaded
patminton-0.1.1.tar.gz 60.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for patminton 0.1.1
File Interpreter ABI Platform
patminton-0.1.1-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details

Total release size: 2.6 MB

Release files / patminton-0.1.1.tar.gz

Download URL patminton-0.1.1.tar.gz
Size 60.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b7d93953c61741d5bc2b4fb5250e78e84060ad5becc4210b35ab37b7e1a0e02f
BLAKE2b-256 checksum
How to use checksums
71e984561de949bb66bf162ecac54b32174862777e1336bbe0e086a293a4da14
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 Sep 24, 2026.

Transparency log

Release files / patminton-0.1.1-py3-none-manylinux_2_28_x86_64.whl

Download URL patminton-0.1.1-py3-none-manylinux_2_28_x86_64.whl
Size 2.6 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b3f71122079cc3fa7c894c6904ccab400b1a6727b24e1ad9f074fccf7be0930a
BLAKE2b-256 checksum
How to use checksums
532c48436f170d856c9cd374ac60107b391e1e1a3c05662c7dff3adea43e9009
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 Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

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