Metadata-Version: 2.4
Name: ptychodus
Version: 1.7.0
Summary: Ptychodus is a ptychography data pipeline application.
License-Expression: BSD-3-Clause
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorcet
Requires-Dist: h5py>=3
Requires-Dist: hdf5plugin
Requires-Dist: httpx
Requires-Dist: matplotlib
Requires-Dist: mlflow-skinny
Requires-Dist: numpy
Requires-Dist: psutil
Requires-Dist: pydantic
Requires-Dist: pydantic-ai<3,>=1.0
Requires-Dist: pyyaml
Requires-Dist: scikit-image
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: tifffile
Requires-Dist: watchdog
Provides-Extra: docs
Requires-Dist: myst-parser; extra == "docs"
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: globus
Requires-Dist: globus-compute-sdk; extra == "globus"
Requires-Dist: globus-sdk>=4.5.0; extra == "globus"
Provides-Extra: gui
Requires-Dist: PyQt5; extra == "gui"
Provides-Extra: ptychi
Requires-Dist: ptychi==2.1.*; extra == "ptychi"
Requires-Dist: torch>=2.4; extra == "ptychi"
Requires-Dist: torchvision; extra == "ptychi"
Provides-Extra: ptychi-cuda128
Requires-Dist: ptychi==2.1.*; extra == "ptychi-cuda128"
Requires-Dist: torch>=2.4; extra == "ptychi-cuda128"
Requires-Dist: torchvision; extra == "ptychi-cuda128"
Provides-Extra: ptychi-cuda130
Requires-Dist: ptychi==2.1.*; extra == "ptychi-cuda130"
Requires-Dist: torch>=2.4; extra == "ptychi-cuda130"
Requires-Dist: torchvision; extra == "ptychi-cuda130"
Provides-Extra: ptychi-cuda132
Requires-Dist: ptychi==2.1.*; extra == "ptychi-cuda132"
Requires-Dist: torch>=2.4; extra == "ptychi-cuda132"
Requires-Dist: torchvision; extra == "ptychi-cuda132"
Provides-Extra: ptychozoon
Requires-Dist: ptychozoon; extra == "ptychozoon"
Provides-Extra: store
Requires-Dist: fastapi>=0.115; extra == "store"
Requires-Dist: fastmcp>=3; extra == "store"
Requires-Dist: uvicorn[standard]>=0.30; extra == "store"
Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == "store"
Requires-Dist: aiosqlite>=0.20; extra == "store"
Requires-Dist: pillow>=10.3; extra == "store"
Requires-Dist: pydantic-settings>=2.5; extra == "store"
Requires-Dist: python-multipart>=0.0.18; extra == "store"
Provides-Extra: xraydb
Requires-Dist: xraydb>=4.5; extra == "xraydb"
Dynamic: license-file

# Ptychodus

[Ptychodus](https://github.com/AdvancedPhotonSource/ptychodus) is a ptychography data analysis application that extracts, loads, and transforms instrument data for processing. It integrates several reconstruction libraries for phase retrieval. Ptychodus can be used interactively or integrated into beamline data pipelines.

## Standard Installation

To install ptychodus from PyPI with the most common optional dependencies:

```sh
$ python -m pip install ptychodus[globus,gui,ptychi]
```

Instructions for installing in containers, uv, and from conda-forge are provided in the `docs` directory.

## Developer Installation

For a developer installation:

```sh
$ git clone https://github.com/AdvancedPhotonSource/ptychodus.git
$ cd ptychodus
$ uv sync --extra globus --extra gui --extra ptychi
```

The `ptychi` extra installs a **CPU** build of PyTorch. For GPU reconstruction, swap it for the extra matching your driver's CUDA ceiling — `nvidia-smi` reports that ceiling on its banner line:

```sh
$ uv sync --extra globus --extra gui --extra ptychi-cuda128   # or -cuda130, -cuda132
```

A build newer than the driver leaves `torch.cuda.is_available()` false and reconstruction silently falls back to the CPU; `uv run ptychodus-system-check` reports the driver ceiling, the PyTorch build and whether the two agree. These extras pin PyTorch to the matching index through `[tool.uv.sources]`, which only `uv` reads — a `pip install` of the same extra takes whatever PyTorch PyPI offers.

Launch `ptychodus`:

```sh
$ uv run ptychodus
```

## Reporting Bugs

Open a bug at <https://github.com/AdvancedPhotonSource/ptychodus/issues>.
