Phaser
BCDI phase retrieval module written in Python 3.x. GPU implementation done using Tensorflow 2.1, with an older library available that uses Tensorflow 1.x.
Install / Use
/learn @siddharth-maddali/PhaserREADME
Phaser: BCDI Phase retrieval in Python
Created by: Siddharth Maddali
Argonne National Laboratory
<a href="https://doi.org/10.5281/zenodo.4305131" style="float: left;"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.4305131.svg" alt="DOI"></a>
MOST RECENT UPDATES
- Genetic algorithms now properly parallelize on the GPU with MPI.
Look at new script
Guided_GPU.pyfor GPU usage of genetic algorithms.
Full changelog
Core.ImageRestartnow automaticallyfftshifts input arrays.- Now suppressing Tensorflow messages in the command line (comment
os.environstatement inPhaser.pyto undo this). GPUModule_Core.ImageRestartnow shadows functionality ofCore.ImageRestart.- Slight tweak to
Guided.pylogging. - New file
Guided_GPU.pyruns genetic algorithms using GPU +mpi4py. - ASCII-art of new logo in
Phaser.py PostProcessing.centerObjectnow removes phase ramps.
Introduction
-
Basic Python tutorial of module
Phaserfor BCDI phase retrieval. -
Contains diffraction geometry modules for the 34-ID-C setup at the Advanced Photon Source.
- Can be easily adapted to other geometries, please open an issue as a feature request if you need this done for your beamline.
-
Modular, much simpler to use and modify than existing Matlab legacy code.
-
Current dependencies (as determined by
pipreqs)
mmatplotlib==3.1.3
scikit_image==0.16.2
tensorflow==2.2.0
mpi4py==3.0.3
tqdm==4.42.1
numpy==1.18.1
scipy==1.4.1
pyfftw==0.12.0
pyvista==0.32.0
pyvistaqt==0.5.0
skimage==0.0
vtk==9.0.3
- These modules are based on my current Python environment.
- All modules can be installed in the usual way:
pip install <module>. - The
tensorflow 1.x-compatible library is available on branchtensorflow-1.xof this repo.
Quick start
A full tutorial on using Phaser to reconstruct your BCDI data is available here.
Related Skills
node-connect
353.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
353.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
353.3kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
