Skip to main content

xptycho

xptycho: ptychographic reconstruction with projected multi-agent consensus equilibrium (PMACE) using PyTorch.

Features include:

  • Reconstruction of the complex object image, magnitude and phase, from far-field diffraction frames.
  • Estimation of the probe together with the object, with one or more probe modes.
  • Refinement of the probe positions.
  • Preprocessing of raw detector frames: dark subtraction, outlier removal, centering, and cropping.
  • One HDF5 file format for scans, samples, and reconstructions.
  • Demos on simulated data and on measured data, from raw file to image.
  • Seamless operation on 1 or more GPUs, Mac MPS, or CPU.

Full documentation at https://xptycho.readthedocs.io/

Design pages at https://cabouman.github.io/xptycho/

Install:

pip install xptycho

Reconstruct in a few lines:

import xptycho as xpt
scan = xpt.Scan.load('scan.h5')
model = xpt.PtychoModel.from_scan(scan)
recon = model.recon(scan)
xpt.view_sample(recon)

xptycho implements the PMACE method of Qiuchen Zhai, Gregery T. Buzzard, Kevin Mertes, Brendt Wohlberg, and Charles A. Bouman. For the papers to cite, the source of the demo data, and the funding support, see Credits.

Metadata

Release files for xptycho 0.1.0

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

Source distribution (sdist)

Source distribution for xptycho 0.1.0
File Size Uploaded
xptycho-0.1.0.tar.gz 30.9 kB Details

Built distribution (wheel)

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

Total release size: 63.4 kB

Release files / xptycho-0.1.0.tar.gz

Download URL xptycho-0.1.0.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
32fa2dfb431a89b8183e3776192736bfd1c92ed7c6bb7a63a275c3531716307c
BLAKE2b-256 checksum
How to use checksums
a6c81c506a6c06e7fa3c67a1b31f5937be9234b2bc04ecae809c70186e15f129
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 Oct 5, 2026.

Transparency log

Release files / xptycho-0.1.0-py3-none-any.whl

Download URL xptycho-0.1.0-py3-none-any.whl
Size 32.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d9aed1da5ea67e52919c6392e5499ede60f1fad33224d9170fd29a11f7ae846c
BLAKE2b-256 checksum
How to use checksums
7db27cd7d7bea2922eee53e6a1b59517571abc1301a870fabfb29602b9b83665
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 Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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