Metadata-Version: 2.4
Name: cuphaser
Version: 0.1.0
Summary: CuPy-based 3D phase retrieval
Author-email: Kartik Ayyer <kartik.ayyer@mpsd.mpg.de>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/AyyerLab/cuphaser
Project-URL: Repository, https://github.com/AyyerLab/cuphaser
Project-URL: Documentation, https://cuphaser.readthedocs.io
Keywords: phase-retrieval,crystallography,cupy,numpy
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: mrcfile
Requires-Dist: h5py
Requires-Dist: PyQt5
Requires-Dist: matplotlib
Requires-Dist: pyqtgraph
Provides-Extra: gpu
Requires-Dist: cupy; extra == "gpu"
Provides-Extra: cuda12x
Requires-Dist: cupy-cuda12x; extra == "cuda12x"
Provides-Extra: cuda13x
Requires-Dist: cupy-cuda13x; extra == "cuda13x"
Provides-Extra: fftw
Requires-Dist: pyfftw; extra == "fftw"
Provides-Extra: dev
Requires-Dist: pylint; extra == "dev"
Provides-Extra: all
Requires-Dist: cupy; extra == "all"
Requires-Dist: pyfftw; extra == "all"
Requires-Dist: pylint; extra == "all"
Dynamic: license-file

# cuphaser

CuPy-based 3D phase retrieval for X-ray single particle imaging.

## Installation

```bash
pip install cuphaser
```

### GPU Support

CuPhaser runs on CPU by default (using NumPy). For GPU acceleration, install the
appropriate CuPy package for your CUDA version:

```bash
# For CUDA 12.x
pip install "cuphaser[cuda12x]"

# For CUDA 13.x
pip install "cuphaser[cuda13x]"
```

Alternatively, install CuPy separately following the
[CuPy installation guide](https://docs.cupy.dev/en/stable/install.html).

### Optional Dependencies

```bash
# With FFTW support (faster CPU FFTs)
pip install "cuphaser[fftw]"
```

### Development Installation

For development, clone the repository and install in editable mode:

```bash
git clone https://github.com/AyyerLab/CuPhaser.git
cd CuPhaser
pip install -e ".[dev]"
```

## Requirements

- Python >= 3.8
- numpy, scipy, mrcfile, h5py
- PyQt5, matplotlib, pyqtgraph
- cupy (optional, for GPU acceleration)
- pyfftw (optional, for faster CPU FFTs)

## Usage

### Preprocessing (required for Dragonfly output)

If using output from Dragonfly, first preprocess it:

```bash
# Interactive GUI for preprocessing configuration
cuphaser.preprocess.gui config.ini

# Or run preprocessing from command line
cuphaser.preprocess config.ini
```

### Phase Retrieval

```bash
cuphaser -c config.ini
```

### Configuration

See `sample.ini` for a complete configuration example.

## License

GPL-3.0
