CuPy-based 3D phase retrieval for X-ray single particle imaging.
pip install cuphaserCuPhaser runs on CPU by default (using NumPy). For GPU acceleration, install the appropriate CuPy package for your CUDA version:
# 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.
# With FFTW support (faster CPU FFTs)
pip install "cuphaser[fftw]"For development, clone the repository and install in editable mode:
git clone https://github.com/AyyerLab/CuPhaser.git
cd CuPhaser
pip install -e ".[dev]"- Python >= 3.8
- numpy, scipy, mrcfile, h5py
- PyQt5, matplotlib, pyqtgraph
- cupy (optional, for GPU acceleration)
- pyfftw (optional, for faster CPU FFTs)
If using output from Dragonfly, first preprocess it:
# Interactive GUI for preprocessing configuration
cuphaser.preprocess.gui config.ini
# Or run preprocessing from command line
cuphaser.preprocess config.inicuphaser -c config.iniSee sample.ini for a complete configuration example.
GPL-3.0