Metadata-Version: 2.4
Name: ptychodus
Version: 1.8.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>=2.2
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: cdtools
Requires-Dist: cdtools-py>=0.3.2; extra == "cdtools"
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.3.*; extra == "ptychi"
Requires-Dist: torch>=2.4; extra == "ptychi"
Requires-Dist: torchvision; extra == "ptychi"
Provides-Extra: ptychi-cuda126
Requires-Dist: ptychi==2.3.*; extra == "ptychi-cuda126"
Requires-Dist: torch>=2.4; extra == "ptychi-cuda126"
Requires-Dist: torchvision; extra == "ptychi-cuda126"
Provides-Extra: ptychi-cuda130
Requires-Dist: ptychi==2.3.*; 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.3.*; 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: webapp
Requires-Dist: fastapi>=0.115; extra == "webapp"
Requires-Dist: fastmcp>=3; extra == "webapp"
Requires-Dist: uvicorn[standard]>=0.30; extra == "webapp"
Requires-Dist: sqlalchemy[asyncio]>=2.0; extra == "webapp"
Requires-Dist: aiosqlite>=0.20; extra == "webapp"
Requires-Dist: pillow>=10.3; extra == "webapp"
Requires-Dist: pydantic-settings>=2.5; extra == "webapp"
Requires-Dist: python-multipart>=0.0.18; extra == "webapp"
Requires-Dist: xraydb>=4.5; extra == "webapp"
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-cuda130   # or -cuda126, -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.

The `cdtools` extra adds [cdtools](https://github.com/cdtools-developers/cdtools)' FancyPtycho model as a further reconstructor. On its own it takes PyPI's default PyTorch; alongside a `ptychi` extra it takes that extra's build:

```sh
$ uv sync --extra globus --extra gui --extra ptychi --extra cdtools
```

Launch `ptychodus`:

```sh
$ uv run ptychodus
```

## Reporting Bugs

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