A tool for ptychographic GPU(multiple)-based reconstruction.
export CUDAHOME=path-to-cuda
python setup.py clean
python setup.py install
cupy - for GPU acceleration of linear algebra operations in iterative schemes. See (https://cupy.chainer.org/). For installation use
conda install -c anaconda cupy
Test PtyGer with siemens-star synthetic dataset:
cd tests/
python test.py 4 0 512 1 32 siemens4g60 -s siemens 256 60
4
: number of GPUs.
0
: GPU id offset (e.g., the first GPU's id is 0).
512
: used for real-experiment data only. Meaningless in synthetic test run.
1
: stride length of the scans.
32
: number of iteration.
siemens4g60
: prefix of the performance data files.
-s
: accepting synthetic dataset (use -r for real-experiment dataset).
siemens
: name of the dataset.
256
: probe size (in this case the probe size is 256^2).
60
: number of scan position (in this case the total number of scan position is 60^2=3600).
In the first running, the synthetic diffraction patterns will be generated and stored as tests/data/siemens/256data60.npy. Any repeated runnings then can directly load this data file.
The reconstructed images will be stored in tests/rec_siemens.