GIWAXS analysis via machine learning

Grazing incidence wide-angle X-ray scattering (GIWAXS)

Grazing incidence wide-angle X-ray scattering (GIWAXS) is a powerful technique for the investigation of crystalline thin films. The reciprocal space intensity maps obtained reveal important structural chracteristics of the investigated samples such as the lattice constants of the constituent crystals, their orientational distribution and the crystal grain sizes. A relevant application of GIWAXS is studying the complex crystallization process of perovskite materials, which is important for optimizing their optoelectronic properties for photovoltaic applications. Such measurements are typically performed in real time, at high aqusition rates and for extended time periods. This process results in large amounts of data (thousands of high resolution 2D GIWAXS images) being collected at each experiment, surpassing the capacity of researchers to manually process and analyse the data. This motivates the need for an automated analysis pipeline for GIWAXS data to be developed.

Analysis of GIWAXS data via deep learning

The physically relevant information contained in the GIWAXS data is the positions and widths of the scattering features. Having access to this information enables the possibility of detailed analysis such as crystal structure determination or the temporal evolution of individual crystal phases. The combination of varying scattering backgrounds, high noise and experimental artifacts makes it challenging to automate the extraction of GIWAXS scattering features with any classical algorithms. Machine learning approaches have been shown to vastly outperform classical approaches in that regard, being able to separate objects from highly noisy and complex backgrounds, with applications ranging from medicine to astrophysics. There are a multitude of modern object detection or segmentation models for data in image form. Such models use a backbone consisting of a deep convolutional neural network to extract feature maps from images, followed by a head which performs additional regression or classification tasks resulting in the final output. We treat the GIWAXS peak extraction as an object detection task and modify the Faster R-CNN object detection model for our specific problem [1]. We want our approach to perform well on any input GIWAXS image, thus we train the model using simulated GIWAXS images with peak positions and sizes randomly generated. In order to make the model as robust as possible we include different types of noise, backrounds and experimental artifacts in the simulations. The trained object detection model is able to extract peak coordinates in a fraction of a second.


'gixi' is a freely available Python package using artificial neural networks that was developed in our group and can be used for GIXD feature detection.


[1] V. Starostin, V. Munteanu, A. Greco, E. Kneschaurek, A. Pleli, F. Bertram, A. Gerlach, A. Hinderhofer, F. Schreiber. Tracking perovskite crystallization via deep learning-based feature detection on 2D X-ray scattering data. npj Comput Mater 8 (2022) 101
[2] A. Hinderhofer, A. Greco, V. Starostin, V. Munteanu, L. Pithan, A. Gerlach, and F. Schreiber. Machine learning for scattering data: strategies, perspectives, and applications to surface scattering. J. Appl. Cryst. 56 (2023) 3

For our recent work on machine learning, see list of publications.