The package ssc-cdi is a collection of coherent diffractive imaging (CDI) tools developed by the Sirius Scientific Computing (SSC) Group at the Brazilian Center for Research in Energy and Materials (CNPEM).
It currently provides high-performance implementations for Ptychography reconstructions. Additional algorithms and research prototypes are continuously incorporated into the project as they mature and undergo validation by the SSC Group.
The source code is publicly archived on Zenodo under DOI 10.5281/zenodo.13693177.
Example scripts are included to help users get started with the package.
💡 For questions, bug reports, or feature requests, contact the Sirius Scientific Computing Team at gcc@lnls.br.
- Leonardo M. Corrêa (CNPEM, ORCID)
- Lucas Antonio Pelike (CNPEM)
- Paola Ferraz (CNPEM, ORCID)
- Matthew R. C. Fitzpatrick (CNPEM, ORCID)
- Mauro Luiz Brandão-Junior (CNPEM, ORCID)
- Alan Zanoni Peixinho (ORCID)
- Camila F. A. Lages (ORCID)
- Julia C. Carvalho
We would like to acknowledge the Brazilian Ministry of Science, Technology, and Innovation MCTI for supporting this work through the Brazilian Center for Research in Energy and Materials (CNPEM).
The development of ssc-cdi has resulted in the following publications:
-
Tonin, Y. R., Peixinho, A. Z., Brandão-Junior, M. L., Ferraz, P., and Miqueles, E. X. (2024). ssc-cdi: A Memory-Efficient, Multi-GPU Package for Ptychography with Extreme Data. Journal of Imaging, 10(11), 286. DOI: https://doi.org/10.3390/jimaging10110286.
-
Baraldi, G. L., Dias, C. S., Silva, F. M., Tolentino, H. C., and Miqueles, E. X. (2020). Fast reconstruction tools for ptychography at Sirius, the fourth-generation Brazilian synchrotron. Journal of Applied Crystallography, 53(6), 1550–1558. DOI: https://doi.org/10.1107/S1600576720013886.
If you use ssc-cdi in published work, please cite:
@Article{jimaging10110286,
author = {Tonin, Yuri Rossi and Peixinho, Alan Zanoni and Brandao-Junior, Mauro Luiz and Ferraz, Paola and Miqueles, Eduardo Xavier},
title = {ssc-cdi: A Memory-Efficient, Multi-GPU Package for Ptychography with Extreme Data},
journal = {Journal of Imaging},
year = {2024},
volume = {10},
number = {11},
pages = {286},
doi = {10.3390/jimaging10110286}
}The HTML documentation is available in:
docs/build/html/index.html
Open this file in your preferred web browser after building the documentation.
To build the documentation from source:
pip install -r docs/requirements.txt
cd docs
make htmlThe generated documentation will be available in:
docs/build/html/
The ssc-cdi package can be installed from source code or directly via pip (within the CNPEM network).
It requires C, C++, CUDA, Python, and CuPy to be installed before installation. The CuPy package is required to use the Maximum-Likelihood (ML) reconstruction engine. See the Requirements section for details.
The ssc-cdi package is imported as sscCdi in Python
import sscCdi
⚠️ CNPEM Network RequiredThis installation method is available only within the CNPEM network.
❗ Tepui Cluster Users
Before installing sscCdi, load the required modules:
cuda/11.2.2,python/3.11.11andgcc/9.5.0-jld3zdv.
Install the latest available version:
pip install sscCdi \
--index-url https://gitlab.cnpem.br/api/v4/projects/1875/packages/pypi/simpleInstall a specific version:
pip install sscCdi==0.14.2 \
--index-url https://gitlab.cnpem.br/api/v4/projects/1875/packages/pypi/simpleReplace 0.14.2 with the desired version number.
⚠️ CNPEM Network RequiredThis installation method is available only within the CNPEM network.
❗ Tepui Cluster Users
Before installing sscCdi, load the required modules:
cuda/11.2.2,python/3.11.11andgcc/9.5.0-jld3zdv.
Clone the repository and install the latest version:
git clone https://gitlab.cnpem.br/sirius/proc-sim-apps/sci/imaging/ssc-cdi.git
cd ssc-cdi
make clean && makeInstall a specific version:
git clone https://gitlab.cnpem.br/sirius/proc-sim-apps/sci/imaging/ssc-cdi.git \
--branch v<version> --single-branch
cd ssc-cdi
make clean && makeFor example:
git clone https://gitlab.cnpem.br/sirius/proc-sim-apps/sci/imaging/ssc-cdi.git \
--branch v0.14.2 --single-branch
cd ssc-cdi
make clean && makeClone the public GitHub repository and install the latest version:
git clone https://github.com/cnpem/ssc-cdi.git
cd ssc-cdi
make clean && makeInstall a specific version:
git clone https://github.com/cnpem/ssc-cdi.git \
--branch v<version> --single-branch
cd ssc-cdi
make clean && makeFor example:
git clone https://github.com/cnpem/ssc-cdi.git \
--branch v0.14.2 --single-branch
cd ssc-cdi
make clean && makeSource code releases are archived on Zenodo: https://doi.org/10.5281/zenodo.13693177
Download the desired version of ssc-cdi.tar.gz and extract it:
tar -xvf ssc-cdi.tar.gzEnter the extracted directory and build the package:
cd ssc-cdi
make clean && makeBefore installing sscCdi, ensure that the following dependencies are available:
| Dependency | Minimum Version |
|---|---|
| CUDA | >= 11.0 |
| GCC / C++ Compiler | >= 9.0 |
| Python | >= 3.8 |
| CMake | >= 3.24 |
| CuPy | Compatible with installed CUDA |
| libcurl4-openssl-dev | - |
| cuBLAS | - |
| cuFFT | - |
| pthreads | - |
| pip | - |
The installed CuPy package must match the CUDA version available on the system. For example:
| CUDA Version | CuPy Package |
|---|---|
| CUDA 11.x | cupy-cuda11x |
| CUDA 12.x | cupy-cuda12x |
sscCdi supports NVIDIA GPUs with compute capability 7.0 or higher and requires a compiler with C++17 support.
The following Python packages are installed automatically:
scikit-build >= 0.17setuptools >= 61.0ninja == 1.11.1.1wheel >= 0.45.0numpyscikit-image >= 0.19.3scipymatplotlibSharedArrayh5pyipywidgetstqdm
To uninstall sscCdi, regardless of the installation method used:
pip uninstall sscCdi