Back to All Events

CoWorkshop – LINXS Partner Event

 

Figure Courtesy of D. Carbone, A. Guarino, R. Hartmann, A. Di Bernardo, A. Vecchione, R.Fittipaldi: coherent diffraction signal from a strained flake of Ca2RuO4, with device made at the University of Konstanz from Ca2RuO4 grown at CNR-Spin in Salerno. Measurement performed at NanoMax.

 

Welcome to a one-day workshop with hands-on training on PtyPy, PyNX and PyPhase, three open-source software packages for phase retrieval of coherent X-ray data, applied to diverse methods: Ptychography, Phase Contrast and Coherent Diffraction Imaging.

This event is organized in connection to the conference Coherence 2024, 16-20 June 2024 Helsingborg.

When: Sunday 16 June, 2024, 10–16.

Where: at LINXS (Scheelevägen 19, Lund), Workshop room on the 5th floor.

Registration information: When you register, please sign up for one of the three offered tutorials. You can read more about them below. Please note that each tutorial has a participant limit of 15 people and will close when full.

You will be asked to provide a short motivation letter with the registration. All registrations are reviewed, and registration is subject to approval of organisers.

In case of over-subscription, precedence will be given to attendees of Coherence 2024.

Registration fee: the workshop has a participation fee of 200 SEK.

Program of the day

10:00–11:00 Introduction of the three packages (for all participants)

12:00–16:00 Parallel workshops with lunch and coffee break

A bus will bring Coherence 2024 participants to Helsingborg after the tutorial sessions.

information on the tutorials offered:

  • PtyPy [1] is a Python framework for the reconstruction of ptychographic data. It includes a wide range of popular reconstruction algorithms such as Difference Map [2], Maximum-Likelihood [3], RAAR [4] and ePIE [5] each with multi-mode [6] support and position refinement. Furthermore, all reconstruction engines have been accelerated with customised CUDA kernels wrapped in Python with PyCUDA and CuPy layers on top. PtyPy is maintained and developed as a community project and is used in production at synchrotron facilities such as the Diamond Light Source (UK) and Max IV (Sweden) and other research facilities around the globe.

    In this hands-on tutorial, we are targeting anybody with interest in using PtyPy for processing their ptychographic data. We are going to demonstrate how to load data, run a reconstruction engine, monitor the progress and troubleshoot potential issues. The tutorials will be delivered using cloud-based resources. We expect participants to bring their own laptop, but there is no need to download or install anything prior to the tutorial. Basic Python skills can be helpful but are not a requirement.

    [1] B.Enders and P.Thibault, Proc. R. Soc. A 472, 20160640 (2016)

    [2] P.Thibault, M.Dierolf et al., Ultramicroscopy 109, 4 (2009)

    [3] P.Thibault and M.Guizar-Sicairos, New J. of Phys. 14, 6 (2012)

    [4] R.Luke. Inverse Probl. 37, 13 (2004)

    [5] A.Maiden and J.Rodeburg, Ultramicroscopy 10, 1256 (2007)

    [6] P.Thibault and A.Menzel, Nature 494, 68 (2013)

    More information on the Software here: https://ptycho.github.io/ptypy/

  • The PyNX toolkit for coherent X-ray imaging provides reconstruction algorithms for a wide range of applications, including Coherent Diffraction Imaging (in small-angle and Bragg geometry), Ptychography (in the near and far-field regimes), as well (more recently) as holo-tomography.

    PyNX was mainly developed at ESRF, and is written from the ground to provide state-of-the-art performance using optimized GPU programming, both in terms of speed and memory requirements. It is used on multiple beamlines notably at ESRF, Soleil and Petra-III, with scripts for data analysis easily expandable for new instruments (only the data input functions need to be updated). Input/output using the standard CXI format is also supported.

    In this tutorial, we will first focus on CDI (small-angle and Bragg geometry) and Ptychography (far and near field) reconstructions on example datasets using command-line scripts (no prior experience required). We will also present the specific case of Bragg CDI analysis, and demonstrate what can be done for holo-tomography dataset reconstructions. We will then show how PyNX can also be used with the python API using notebooks.

    PyNX is mainly written to be used using a GPU (the CPU implementations do not have the same features), preferably Nvidia (more optimized). Instructions for installation can be found on the PyNX documentation.

    * main PyNX documentation: http://ftp.esrf.fr/pub/scisoft/PyNX/doc/

    * article: J. Appl. Cryst. 53 (2020), 1404, [arXiv:2008.11511]

    * git repository: https://gitlab.esrf.fr/favre/PyNX

    More information on the Software here: http://ftp.esrf.fr/pub/scisoft/PyNX/doc/

  • PyPhase: is an open-source Python package for phase retrieval from phase contrast images in the Fresnel regime [1]. The main aim with PyPhase is to provide a large library of phase-retrieval algorithms to cover a wide range of experimental conditions and samples. A large part is dedicated to variational approaches (e.g., [2, 3]) and algorithms based on machine learning are currently being integrated (e.g., [4]). Further, with PyPhase we aim to provide a flexible phase-retrieval toolbox for expert users, along with tools for the implementation and development of phase-retrieval algorithms and tools for deployment on computer clusters and heterogeneous computing infrastructures. We aim at keeping a high level of modularity to help integration of different packages such as image registration, tomographic reconstruction, Fast Fourier Transform, reading and writing data, and visualization.

    The aim of this tutorial is to give an introduction to the PyPhase package and its installation and usage. It is recommended participants bring their own data to start data analysis using PyPhase. Problems, requests, and future directions will be collected and discussed.

    [1] Langer et al. J. Synchrotron Radiat. 28, 1261 (2021)

    [2] Mom et al., Opt Lett. 47, 5389 (2022)

    [3] Maretzke et al., Opt. Express 24, 6490 (2016)

    [4] Mom et al., Opt. Lett 48, 1136 (2023)

    Repository: https://gitlab.in2p3.fr/mlanger/pyPhase/

    More information on the Software here: https://pyphase.readthedocs.io/

contact

For questions about the content of the workshop, please contact: gerardina.carbone@maxiv.lu.se

For practical questions regarding e.g., registration, please contact: josefin.martell@linxs.lu.se