Forked from https://github.com/ochubar/SRW/blob/d1133bc32024049bc1e177ace1f9136a2f113f16/env/work/srw_python/SRWLIB_Example12.py