samoylv / WPG

WPG: WavePropaGator, Interactive framework for X-ray FEL optics design and simulations.
Other
26 stars 20 forks source link

WPG

WPG, WavePropaGator, is an interactive simulation framework for X-ray wavefront propagation.

WPG provides intuitive interface to the SRW library. The application examples are mainly oriented on European XFEL design parameters. To learn more details, see online documentation pages.

Fast installation

Python requiements

From relese 2019.12 we drop support of python2. Please use python 3.6 or 3.7.

Get sources

Download sources https://github.com/samoylv/WPG/archive/develop.zip or clone git repository

git clone https://github.com/samoylv/WPG.git

Install python environment

Install conda from https://docs.conda.io/en/latest/miniconda.html or https://www.anaconda.com/distribution/ or from command line on Linux

wget -c https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

Install dependencies

conda create -n wpg36 --file requirements.txt -c conda-forge -y
conda activate wpg36

For Maxwell server users

For DESY Maxwell server you usually should install conda env to your GPSF partition, for example

conda create --prefix /gpfs/exfel/data/user/buzmakov/conda_env/wpg36 --file requirements.txt -c conda-forge -y

Build Linux version

cd WPG
make

if you need SRW with OpenMP support (currently crashed on Maxwell in some cases)

cd WPG
OPENMP_MODE=omp make

Get Windows binaries

WPG contain original SRW binaries for python 3.6 x64 with OpenMP support.

conda create -n wpg36 --file requirements_win.txt -c conda-forge -y
conda activate wpg36

Other windows binaries of SRW may be copied from original SRW repository (https://github.com/ochubar/SRW/tree/master/env/work/srw_python/lib) and placed in WPG/wpg/srw folder

Run smaples

Run

cd WPG
jupyter notebook

Try run samples from WPG/samples/Tutorials

References

If you use the WPG for your research, we would appreciate it if you would refer to the following paper:

Primary works that use WPG