# Overcoming the data processing challenges of unifying tomography techniques at ESRF

H Payno, P Paleo, C Nemoz, P Cloetens, M Di Michiel, A Rack, P Tafforeau,

V A Solé, N R Viganò

► To cite this version:

H Payno, P Paleo, C Nemoz, P Cloetens, M Di Michiel, et al. Overcoming the data processing challenges of unifying tomography techniques at ESRF. Journal of Physics: Conference Series, 2022, 2380 (1), pp.012106. 10.1088/1742-6596/2380/1/012106. [hal-05075985](https://HAL Id: hal-05075985)

https://cnrs.hal.science/hal-05075985v1

Submitted on 21 May 2025

**HAL** is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire **HAL**, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
PAPER • OPEN ACCESS

# Overcoming the data processing challenges of unifying tomography techniques at ESRF

To cite this article: H Payno et al 2022 *J. Phys.: Conf. Ser.* 2380 012106

View the [article online](#) for updates and enhancements.

You may also like

- [ESRF-EBS lattice model with canted beamlines](#)

S M Liuzzo, N Carmignani, J Chavanne et al.

- [New frontiers in extreme conditions](#)

[science at synchrotrons and free electron lasers](#)

Valerio Cerantola, Angelika Dorothea Rosa, Zuzana Koněpková et al.

- [Low emittance electron storage rings](#)

E B Levichev

<figure><img src="image_2.png" /></figure>

<figure><img src="image_3.png" /></figure>

**ECS**
The
Electrochemical
Society

Advancing solid state &
electrochemical science & technology

<figure><img src="image_4.png" /></figure>

Allen J. Bard
ECS Member
# Overcoming the data processing challenges of unifying tomography techniques at ESRF

H Payno, P Paleo, C Nemoz, P Cloetens, M di Michiel, A Rack, P Tafforeau, V A Solé, and N R Viganò

ESRF — The European Synchrotron, 71 av. des Martyrs, 38000 Grenoble, France

E-mail: nicola.vigano@esrf.fr

**Abstract.** The ESRF tomography software is undergoing a major re-write, targeted at unifying the tomography user experience, data acquisition, data format, and processing tools. To cope with the inherent large complexity of handling data coming from multiple beamlines, techniques and facilities, we are developing an open source software called *NXtomomill*. It is named after the *NXtomo* application class of the NeXus data format, and it will offer advanced data conversion, manipulation and reduction functions. This includes azimuthal integration for X-ray Diffraction CT, and elemental fitting for X-ray Fluorescence CT.
This work will have a remarkable impact on resource management, software robustness, and data storage. With the addition of the new functionality of the ESRF data portal, it will also unlock unimagined opportunities with respect to the automation of artificial intelligence techniques on large and heterogeneous collections of datasets.

## 1. Introduction

The ESRF (European Synchrotron) hosts several tomography beamlines, which use different types of contrast and offer vastly different resolutions and performance. Their acquisition and processing software are exceedingly fragmented. There exist many different codes and solutions for similar problems. This hampers the exchange and processing of data collected on different beamlines, while its associated maintenance / development costs hindered its progress.

### 1.1. Unified acquisition and processing

The tomography acquisition system and processing workflows are being re-developed from scratch. The goal is to modernize them, both in terms of offered features and used technologies, while rendering their maintenance easier and less resource demanding. The beamline control system is being re-written in the Python language, which forces the acquisition software to be re-written as well. The new control system is called Bliss [1]. In this process, we are developing unified solutions whenever possible, with the aim to deliver both a homogeneous experience across all ESRF beamlines, and robust high-performance processing software [2] (ref. Fig. 1). Thus, we aim at delivering a unified acquisition solution for all tomography scans, ranging from full-field X-ray phase-contrast, to pencil-beam X-ray Fluorescence and X-ray Diffraction CT (PCT, XRF-CT, and XRD-CT, respectively).

In addition to the change in acquisition system, we are transitioning away from the traditional ESRF data files (EDF), and adopting the use of HDF5 files for the saved raw data [3]. This

<figure><img src="image_5.png" /></figure>
<figure><img src="image_6.png" /></figure>

**Figure 1.** The ESRF is currently unifying its acquisition and processing software, across multiple beamlines and tomographic techniques. This will include full-field transmission techniques (e.g. single-distance X-ray phase-contrast imaging), and pencil beam scanning techniques (e.g. X-ray Fluorescence and X-ray Diffraction CT).

data is saved following the NeXus convention [4]. NeXus is an international standard for storing acquired X-ray and neutron data. It defines conventions for field names and attributes, and their organization.

## 1.2. Challenges

While NeXus introduces a certain level of standardization, it does not impose the name or presence of specific fields. For various practical reasons, different beamlines and techniques adopt slightly different data formats, all compliant with the NeXus convention. This renders the information extraction a complicated and dedicated process, despite all the data files being in the same file and data format.

Additionally, each type of contrast might need dedicated pre-processing and/or treatment. For instance, single-distance PCT usually only requires a filtering step of the transmission images, while XRF-CT requires elemental fitting (EF) of the acquired spectra, and XRD-CT requires azimuthal integration of the diffraction images [5].

# 2. Addressing the problems

We address these problems with a unique common data format, and versatile data conversion and reduction software.

NeXus proposes so-called *application classes*. They address the problem discussed in section 1.2, by specifying required fields and their names for a given technique. Among the possible application classes, *NXtomo* is the one dedicated to a common tomographic data format. We are now developing *NXtomomill* as an open source software package, for the transformation of all the required raw tomographic data into NXtomo compliant form [6]. The tomographic reconstruction software using the produced NXtomo data does not need to be heavily adapted to the specific technique or application, because NXtomomill has already treated and reduced the technique dependent aspects. As a result, the unified tomographic reconstruction software can be optimized for speed, with minimal technique dependent adjustments. This is already taken into account into the next generation reconstruction software developed at the ESRF, called *Nabu* [7].

## 2.1. Interoperability and backward compatibility

NXtomomill enables out-of-the-box the conversion of several full-field input data formats into NXtomo. This includes traditional ESRF's EDF full-field datasets, and APS' `DataExchange` (`DxFile`) [8].

By allowing the conversion of other facilities' data formats, NXtomomill introduces the possibility to easily test out ESRF software (e.g. Nabu) on datasets acquired at those other
facilities. On the other hand, the support for the older ESRF full-field tomographic data format ensures backward compatibility of existing datasets with Nabu.

Whenever possible, the produced HDF5 files are shallow copies of the input data files. This is achieved through the use of HDF5's virtual datasets (VDS). This solution greatly reduces the data and computational footprint of the conversion.

## 2.2. Further conversion customization

NXtomomill supports the conversion of arbitrarily defined data formats, through the use of a “description file” (also internally called “configuration file”). In such description file, the user indicates the position of the raw data and the metadata, by pointing to various files and fields of HDF5 files. NXtomomill uses the gathered information to assemble a valid NXtomo file.

On top of accepting a conversion description file, NXtomomill also exposes a Python API (application programming interface). This API can be used as a Python library for directly producing NXtomo file from Python applications. This relieves the burden of developing data handling code for third party applications. The API is flexible and convenient, allowing to assign data to the resulting HDF5 datasets both in the form of in-memory arrays and data paths to other files. NXtomomill will take care of finding and writing such data, while creating a coherent and well-formed NXtomo file.

## 2.3. Multi-technique support

Nxtomomill is receiving support for plug-ins. This enables the use of external specialized software for data transformation and reduction purposes. Currently, the plug-in support is being leveraged to introduce support for the AI of XRD-CT scans. The AI is performed by the software PyFAI [9], while NXtomomill is responsible for feeding PyFAI the data, and for organizing its output in the NXtomo format. The resulting NXtomo file contains a stack of sinograms for each individual integration bin (corresponding to a different diffraction scattering angle).

Similarly to what is being done for XRD-CT, NXtomomill will soon receive support for EF of XRF-CT scans. The EF will be performed with the software PyMCA [10]. The AI and EF processes typically reduce data sizes by three orders of magnitude. In the future, we are also planning to support advanced phase retrieval methods (e.g. holotomography), through the use of the software PyNX [11].

## 2.4. Computation distribution

The data reduction processes discussed in section 2.3 can be very demanding, both in terms of Input/Output (I/O) bandwidth and computational resources. For this reason, NXtomomill is receiving support for the parallel distribution of such computation on multiple available resources. This is achieved through an external plugin called *Integrator* [12]. It achieves the parallelization by creating multiple instances of the external software used for data reduction, and then by spreading the raw data across these multiple instances.

The distribution can be over multiple CPUs or GPUs. This can greatly improve the performance of the data reduction phase, in a transparent manner to the user. As an example, we performed the AI of 10 million images from a Pilatus CdTe 2M detector (1679 × 1475 pixels each), over a DELL server equipped with AMD EPYC 7543 × 2 CPUs (64 cores), Nvidia A40 × 2 GPUs, 512 GB of RAM, and a 25 Gb network link. The AI took 1h51m with parallelization, and 13h53m without it.

# 3. Discussion and conclusions

NXtomomill guarantees an identical output data format for each ingested raw data format and data type, and it decouples data handling from data reconstruction. This results in uniform
<figure><img src="image_7.png" /><figcaption>**Figure 2.** NXtomomill is being developed with the aim to pre-process raw data, coming from a multitude of tomography techniques. It is designed to provide support for re-arranging and reducing the different types of data into a unique *Nxtomo* format. The tomographic reconstruction software using the produced Nxtomo data does not need to be heavily adapted to the specific technique or application, because NXtomomill has already treated and reduced the technique dependent aspects.</figcaption></figure>

user experience, easier development of the data processing tools, reduced maintenance costs, and greater robustness of the tomography processing pipeline. This also supports easier data and software exchanges with other synchrotron radiation facilities.

## 4. Outlook

The ESRF data portal will allow browsing multitudes of related datasets [13]. When coupled with a common and informative data format, it will strongly reduce the complexity of feeding the automatic training of artificial intelligence / deep-learning methods. Those methods will benefit from large and heterogeneous collections of datasets, producing similar outcome and impact of ImageNet [14].

## References

[1] Guijarro M, Berruyer G, Beteva A, Claustre L, Coutinho T, Dominguez M, Guillou P, Guilloud C, Homs A, Meyer J, Michel V, Pancino P, Papillon E, Perez M, Petitdemange S, Pithan L, Sever F and Valls V 2020 Beamline Experiments at ESRF with BLISS Proc. ICALEPCS’19 (International Conference on Accelerator and Large Experimental Physics Control Systems no 17) (JACoW Publishing, Geneva, Switzerland) pp 70–77 ISBN 978-3-95450-209-7 ISSN 2226-0358 URL https://gitlab.esrf.fr/bliss/bliss

[2] Viganò N, Cloetens P, Di Michiel M, Rack A and Tafforeau P 2021 Redefining the ESRF tomography software OSA Imaging and Applied Optics Congress 2021 (3D, COSI, DH, ISA, pcAOP) (Washington, D.C.: OSA) p DF2G.4 ISBN 978-1-943580-89-7

[3] The HDF Group 1997 Hierarchical Data Format, version 5 URL https://www.hdfgroup.org/HDF5/

[4] Könnecke M, Akeroyd F A, Bernstein H J, Brewster A S, Campbell S I, Clausen B, Cottrell S, Hoffmann J U, Jemian P R, Männicke D, Osborn R, Peterson P F, Richter T, Suzuki J, Watts B, Wintersberger E and Wuttke J 2015 Journal of Applied Crystallography 48 301–305 ISSN 1600-5767

[5] Artioli G, Cerulli T, Cruciani G, Dalconi M C, Ferrari G, Parisatto M, Rack A and Tucoulou R 2010 Analytical and Bioanalytical Chemistry 397 2131–2136 ISSN 1618-2642

[6] Payno H, Nemoz C and Paleo P 2020 Nxtomomill URL https://gitlab.esrf.fr/tomotools/nxtomomill
[7] Paleo P, Mirone A, Nemoz C and Viganò N R 2019 Nabu https://gitlab.esrf.fr/tomotools/nabu

[8] De Carlo F, Gürsoy D, Marone F, Rivers M, Parkinson D Y, Khan F, Schwarz N, Vine D J, Vogt S, Gleber S C, Narayanan S, Newville M, Lanzirotti T, Sun Y, Hong Y P and Jacobsen C 2014 *Journal of Synchrotron Radiation* **21** 1224–1230 ISSN 1600-5775 URL https://github.com/data-exchange/dxchange

[9] Ashiotis G, Deschildre A, Nawaz Z, Wright J P, Karkoulis D, Picca F E and Kieffer J 2015 *Journal of Applied Crystallography* **48** 510–519 ISSN 1600-5767 URL https://github.com/silx-kit/pyFAI

[10] Solé V, Papillon E, Cotte M, Walter P and Susini J 2007 *Spectrochimica Acta Part B: Atomic Spectroscopy* **62** 63–68 ISSN 05848547 URL http://pymca.sourceforge.net/

[11] Favre-Nicolin V, Girard G, Leake S, Carnis J, Chushkin Y, Kieffer J, Paleo P and Richard M I 2020 *Journal of Applied Crystallography* **53** 1404–1413 ISSN 1600-5767 URL http://ftp.esrf.fr/pub/scisoft/PyNX/doc/

[12] Paleo P 2021 Integrator https://gitlab.esrf.fr/tomotools/integrator

[13] Dimper R, Gotz A, Favre-Nicolin V, Lebayle B, Nevo C, Perrin J F, Sole V A, Reichert H and Susini J 2021 Esrf information technology data strategy 2022 - 2026

[14] Deng J, Dong W, Socher R, Li L J, Kai Li and Li Fei-Fei 2009 ImageNet: A large-scale hierarchical image database *2009 IEEE Conference on Computer Vision and Pattern Recognition (IEEE)* pp 248–255 ISBN 978-1-4244-3992-8