# Digital twin enables radiosensitive organic speciation in 3D

Laure Cazals, Agnès Desolneux, Simo Huotari, Lauren Dalecky, Christoph Sahle, Alessandro Mirone, Serge Cohen, Loïc Bertrand

► To cite this version:

Laure Cazals, Agnès Desolneux, Simo Huotari, Lauren Dalecky, Christoph Sahle, et al. Digital twin enables radiosensitive organic speciation in 3D. Science Advances, 2025, 11 (41), pp.eadw5444. 10.1126/sciadv.adw5444. hal-05309666

HAL Id: hal-05309666

https://hal.science/hal-05309666v1

Submitted on 11 Oct 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished 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
<figure><img src="image_2.png" /></figure>

APPLIED PHYSICS

# Digital twin enables radiosensitive organic speciation in 3D

Laure Cazals<fnref n="1" />, Agnès Desolneux<fnref n="2" />, Simo Huotari³, Lauren Dalecky<fnref n="1" />, Christoph Sahle⁴, Alessandro Mirone⁴, Serge X. Cohen⁵, Loïc Bertrand<fnref n="1" />*

State-of-the-art spectral imaging techniques using high-brilliance sources face an inherent trade-off between signal intensity and sample integrity, particularly in hyperspectral and multispectral imaging. Traditionally, optimizing acquisition parameters, such as source wavelength, intensity, and exposure time, relies on empirical adjustments to enhance image contrast. Here, we introduce a digital twin methodology to overcome these limitations. Focusing on x-ray Raman imaging, a powerful yet underutilized speciation probe constrained by low quantum efficiency, we demonstrate its application to sensitive organic samples. Our approach enabled a 10-fold reduction in acquisition time while maintaining operation below the damage threshold, paving the way for high-fidelity spectral imaging with minimal sample degradation.

Copyright © 2025 The
Authors, some rights
reserved; exclusive
licensee American
Association for the
Advancement of
Science. No claim to
original U.S.
Government Works.
Distributed under a
Creative Commons
Attribution License 4.0
(CC BY).

INTRODUCTION

Spectral imaging, which samples a spectrum at different points in space, has become a ubiquitous method for spatially classifying material systems (1). Hyperspectral images are collected over numerous bands that can be considered to provide a continuous spectrum at a (energy) resolution typically used for spectroscopy (2). In contrast, multispectral images are collected over a limited number of discrete (and usually wider) bands (3). A number of applied contributions compared the effectiveness of multispectral and hyperspectral imagery for different fields of applications, including satellite sensing, forest management, plant biology, food, and heritage chemistry (4-7). In chemical imaging, the large amount of information collected with both modalities implies long acquisition times, which can compromise a sample's integrity (8-10). In particular, the high dose of electromagnetic radiation required to gather a sufficient signal can irreversibly damage inorganic and, even more so, organic samples (11, 12). Different approaches are used to obtain sufficient count statistics while mitigating damage, such as cryogenic freezing (13, 14). However, cold temperatures can themselves be very detrimental to the integrity of samples (15). Beyond these approaches, strategies based on increasing beam size, reducing beam flux and/or dwell time strongly impact the data collected. Dose reduction can pose the challenge of untangling the collected signal. A critical choice must be made to find a trade-off between sample preservation and the amount of knowledge collected.

When the probability of interaction between probe and matter is low, the choice of optimal parameters determines the success or failure of the experiment. Here, we consider a particularly promising speciation method, x-ray Raman spectral imaging. X-ray Raman inelastic spectroscopy, based on the energy loss excitation of core electrons by hard x-ray photons, is used for the in situ

speciation of light elements (16–18). A fraction of the energy and momentum of incoming photons is transferred to electrons, leading to their excitation to an unoccupied state. These excitations allow scanning the binding energies that characterize atomic speciation (in particular chemical bonding, oxidation state and site symmetry) (19). The inelastic nature of this process makes it possible to characterize low-energy absorption edges at a few hundred electronvolts while probing and detecting with hard x-ray photons (typ. 5 to 20 keV). These can penetrate materials from a few tens of micrometers to several millimeters, depending on their composition, making x-ray Raman scattering (XRS) spectroscopy a unique bulk probe (20–22). Two-dimensional (2D) or 3D imaging can be done by scanning the surface while collecting signals in the depth dimension on the area detector (23). In practice, the probe's unique ability to acquire the speciation of light elements in 3D has not led to the expected use. The very small effective cross section of inelastic x-ray scattering, several orders of magnitude smaller than that of the photoelectric effect, means that samples are subjected to extreme doses of radiation over a long acquisition time, beyond their damage threshold (18). Only a few examples of spectral imaging studies based on the method have been published to date, limited to specific samples that can withstand high levels of irradiation (24, 25).

Here, we show that the development of a suitable digital twin unlocks the implementation of XRS imaging of radiosensitive organic samples. While, in practice, spectroscopists use the salient features of spectra as the main criterion to increase image contrast, we have modeled the influence of the main experimental parameters on the ability to factorize the generated datacube, taking into account the Poisson nature of the noise. A convex optimization approach toward sparser selection of spectral bands was designed. We show that this approach considerably improves the ability to recover sample chemistry. The hybridization of collected and synthetic data has made it possible to obtain 3D speciation of photosensitive materials. Our results show that using a large number of spectral bands within a limited time budget is not an optimal strategy. This work opens the way to faster and more efficient imaging modalities, preserving samples from biology to chemistry and material sciences.

<footnote n="1">¹ENS Paris-Saclay, CNRS, PPSM, Université Paris-Saclay, 91190 Gif-sur-Yvette, France.</footnote>

<footnote n="2">²ENS Paris-Saclay, CNRS, Centre Borelli, Université Paris-Saclay, 91190 Gif-sur-Yvette, France. ³Department of Physics, University of Helsinki, POB 64, FI-00014 Helsinki, Finland. ⁴ESRF, The European Synchrotron, CS 40220, 38043 Grenoble Cedex 9, France. ⁵CNRS, UVSQ, MNHN, Ministère de la Culture, IPANEMA, Université Paris-Saclay, 91192 Saint-Aubin, France.</footnote>

<footnote>*Corresponding author. Email: loic.bertrand@ens-paris-saclay.fr</footnote>
## RESULTS

The quantity measured in a nonresonant inelastic x-ray scattering experiment, including XRS, is the double differential scattering cross section

$$ \frac{d^2\sigma}{d\Omega d\omega} = \left(\frac{d\sigma}{d\Omega}\right)_{\text{Th}} S(\mathbf{q}, \omega) \quad (1) $$

Here, $(\frac{d\sigma}{d\Omega})_{\text{Th}}$ is the Thomson scattering cross section, and $S(\mathbf{q}, \omega)$ is the dynamic structure factor, which holds the information of interest

$$ S(\mathbf{q}, \omega) = \sum_{f} |\langle f | \exp(i\mathbf{q} \cdot \mathbf{r}) | i \rangle|^2 \delta(E_i - E_f + \omega) \quad (2) $$

where $\omega$ and $\mathbf{q}$ are the energy and momentum transferred to the system during the scattering process, respectively. $|i\rangle$ is the initial state, the $|f\rangle$ s are the possible final states, and $E_i$ (resp. $E_f$) is the energy of the initial (resp. final) state. XRS results from scanning $\omega$ across an absorption edge of the target element. For small $\|\mathbf{q}\|$ values, XRS is formally equivalent to x-ray absorption spectroscopy (26) with sensitivity to the chemical environment of the absorbing/scattering atom. At larger momentum transfer XRS can provide even richer information through higher-order multipole contributions. XRS-based 3D imaging experiments rely on the capture of photons scattered along the beam using a pixelated surface detector, instantly forming a 1D image without having to solve inverse problems (direct tomography). A 4D volume is obtained by scanning the $(y, z)$ surface and the energy range of interest (23, 27).

We designed the digital twin of the detection of a 4D spectral image. Each acquisition scenario is integrated into the model and then evaluated in terms of its impact on image classification efficiency. We constructed an algorithm to identify the optimal scenario in terms of spectral band selection.

### Defining the acceptable absorbed dose

Probing matter with high-energy ionizing photons from several to tens of kiloelectronvolts induces radiation damage, mainly through two processes: the photoelectric effect and Compton scattering. The dose $D = E_{\text{dep}}/m$ is the deposited energy during irradiation, $E_{\text{dep}}$, per sample mass, $m$. In the most common case of dose-dependent degradation pathways, $D$ is proportional to the irradiation time at a given excitation energy $E$ (10). For a homogeneous material, the attenuation of the beam typically follows a Victoreen law as a function of $E$ outside the absorption edges of the constituent elements (28). Consequently, a small variation in $E$ of a few tens of eV's in a range of 5 to 20 keV, as in XRS, has very little impact on the dose. We can therefore translate the acceptable dose into a time budget per voxel, for a given experimental configuration and sample composition. In real life, experimenters play with two main sets of parameters: the number of energy points and the acquisition time per energy point. It is these parameters that we have decided to optimize.

### Constructing the ground truth of the spectral image of a radiation-sensitive sample

For a given sample position $(y, z)$ and an $\omega$ energy loss, the pixelated detector collects a one-dimensional image of the beam path for each spherically bent crystal analyzer $a$. The intensity of single emitting points located along the beam is proportional to the dynamic structure factor $S(\mathbf{q}, \omega, \mathbf{x})$, and $\mathbf{x}$ being the $(x, y, z)$ coordinates of a voxel.

As the effects of reabsorption in transmission can be neglected at high energy for organic samples, each voxel $\mathbf{x}$ of the sample is modeled as the sum of the emissions from a single point times the scatterers densities on the forward scattering analyzers for which the dipole approximation is valid (small $\mathbf{q}$). We consider the generic case of a material leading to a 4D image, referred to here as a datacube, which can be modeled as a piecewise-constant spatial distribution of pure phases with noncollinear spectra. As this image is the result of a projection of scattered photons onto a voxel grid, partial volume effects, mixing of phase signals resulting from the finite spatial resolution of the detector, are taken into account at phase boundaries. Each phase is characterized by a phase spectrum $I_k^0$ with $k \in \llbracket 1, K \rrbracket$, and $K$ being the total number of phases used to describe the sample. A linear mixture model is used to generate the ground truth, the ideal expected spectral image, taking into account the mathematical description of the sample morphology and partial volume effects. The ground-truth signal for each voxel $\mathbf{x}$ is modeled as

$$ I^0(\mathbf{x}, e_n) = \sum_{k=1}^{K} P_k^0(\mathbf{x}) I_k^0(e_n), \quad \text{with } I_k^0 = I_k^{\text{XRS}} + I_k^{\text{bkg}} \quad (3) $$

with $\{e_n\}_{n=1,...,N}$ the energy points, $N$ the total number of points in the spectral dimension, and $P_k^0(\mathbf{x})$ the factorization coefficients of each phase $k$. The $I_k^0$ s are the sum of the signals collected by the crystal analyzers indexed by $a$ at different forward scattering angles, corresponding to different low momentum transfers. They are written as the sum of the XRS signal $I_k^{\text{XRS}}$ and the background signal $I_k^{\text{bkg}}$, coming mainly from plasmons and electron-hole pair excitation.

### Simulating the acquisition time

As each pixel of the detector is a photon counter with a quantum efficiency of detection of approximately 0.85 for 12.9 keV, the only source of noise is shot noise (29). The acquisition time is simulated by the addition of synthetic shot noise (Poisson noise). The synthetic collected signal in $\mathbf{x}$ is modeled by a discrete random variable $Y$ following a Poisson distribution with parameter $\lambda$, $Y \sim P(\lambda)$, thus having the expected value $E(Y) = \lambda$ and variance $Var(Y) = \lambda$. For each energy point $e_n$ and each voxel $\mathbf{x}$ we simulate a Poisson distribution to model the signal collected on each crystal analyzer $a \in \llbracket 1, A \rrbracket$, $A$ being the total number of crystal analyzers placed at different scattering angles

$$ S^a(\mathbf{x}, e_n) \sim P(t \times \alpha^a \times I^{0,a}(\mathbf{x}, e_n)) \quad (4) $$

with $\{S^a(\mathbf{x}, e_n)\}_{n=1,...,N}$ being independent, and $t$ the acquisition time per energy point directly linked to the number of photons counted on the detectors. The acquisition time is considered equal to the irradiation time, assuming that the beam does not irradiate the sample without data being acquired. The constant $\alpha^a$ is referred to here as the detection efficiency, the product of $(1 - \text{air absorption})$ and the quantum efficiency (mainly due to angular acceptance) for a given incoming flux. The collected XRS image results from the combination of signals from several forward scattering detection angles with different $\alpha^a$ values and therefore, different noise levels. To build this image, the signals from the crystal analyzers are interpolated onto common spatial and spectral grids, before being summed. Interpolation of these Poisson realizations
preserves the Poissonian nature of the reconstructed image under the approximation in Supplementary Text. Assuming that the spectral information at low-momentum transfer is identical, the signals detected at different forward angles are statistically described as Poisson realizations of the same $I^0$ spectrum. Equation 4 for all crystals combined becomes for each energy point $e_n$ and each voxel $\mathbf{x}$

$$S \sim \mathcal{P}(t \times (\alpha^1 I^{0,1} + \dots + \alpha^A I^{0,A})) = \mathcal{P}(t \times \alpha \times I^0) \text{ with } \alpha = \sum_{a=1}^{A} \alpha^a \quad (5)$$

## Factoring the synthetic datacube

To retrieve the phase distribution from the noisy image, we compare $S$ to the mathematical model of the signal (Eq. 3). The least squares method is applied to estimate the factorization coefficients of phase spectra, $I_k^0$:

$$\hat{\mathbf{p}}(\mathbf{x}) = \underset{\mathbf{p}=(p_1, \dots, p_K)}{\operatorname{Argmin}} \sum_{n=1}^{N} \{S(\mathbf{x}, e_n) - t\alpha [p_1 I_1^0(e_n) + p_2 I_2^0(e_n) + \dots + p_K I_K^0(e_n)]\}^2 \quad (6)$$

It leads to the following linear equation

$$\hat{\mathbf{p}}(\mathbf{x}) = \frac{1}{t\alpha} (\mathbf{G}^0)^{-1} (\mathbf{I}^0)^T \mathbf{S}(\mathbf{x}) \quad (7)$$

with

$$\mathbf{S}(\mathbf{x}) = \begin{bmatrix} S(\mathbf{x}, e_1) \\ \vdots \\ S(\mathbf{x}, e_N) \end{bmatrix} \quad \text{and} \quad \mathbf{I}^0 = \begin{bmatrix} I_1^0(e_1) & \dots & I_K^0(e_1) \\ \vdots & \ddots & \vdots \\ I_1^0(e_N) & \dots & I_K^0(e_N) \end{bmatrix} \quad (8)$$

and $\mathbf{G}^0 = (\mathbf{I}^0)^T \mathbf{I}^0$, the Gram matrix of the $I_k^0$s, a symmetric positive $K \times K$ matrix. The least squares estimator is unbiased for the calculation of factorization coefficients. The latter, defined in Eq. 7, gives the concentration of the phases present in the sample at voxel $\mathbf{x}$, corresponding to the phase spectra. In addition, we apply a mean filter, taking advantage of the piecewise-constant nature of the ground truth. Underlying this method is the assumption that nearest-neighbor voxels are more likely to belong to the same class rather than the opposite and thus considers the spatial regularity affixed to the sample topology.

## Subsampling the set of energies

A critical choice must be made in the selection of the {$e_n$}$_{n=1,...,N}$ energy points, i.e., the definition of an energy grid, to maintain data interpretability. We define the criterion for choosing a subset of energy points as its ability to minimize the mean squared error of the estimated factorization coefficients $\hat{\mathbf{p}}(\mathbf{x})$ at each voxel $\mathbf{x}$. Calculating the latter leads to the following inequality (Supplementary Text)

$$\mathbb{E}[\|\hat{\mathbf{p}}(\mathbf{x}) - \mathbf{p}^0(\mathbf{x})\|^2] = \mathrm{Tr}[\mathrm{Cov}[\hat{\mathbf{p}}(\mathbf{x})]] \le \frac{C}{\alpha t} \times \mathrm{Tr}[(\mathbf{G}^0)^{-1}] \quad (9)$$

with $C$ a constant. At a fixed $t$, and for a number of energy points $M < N$, we define the following function to optimize the subsampling of the energy grid

$$F(\mathbf{\omega}) = \mathrm{Tr}[\mathbf{G}^0(\mathbf{\omega})^{-1}] \quad (10)$$

where the $\mathbf{G}^0$ matrix has been rewritten to include the selection of energy subsets using the vector $\mathbf{\omega} \in \Omega_M = \{(\omega_1, \dots, \omega_N) \in \{0, 1\}^N \text{ with } \sum_{n=1}^N \omega_n \le M\}$

$$G_{k,l}^0(\mathbf{\omega}) = \sum_{n=1}^{N} \omega_n I_k^0(e_n) I_l^0(e_n) \quad (11)$$

with $k, l \in \{1, K\}$. At fixed $t$ and $M$, the objective is to find the $\mathbf{\omega} \in \Omega_M$ minimizing $F(\mathbf{\omega})$ leading to an optimal selection of energy points. We note that to discriminate $K$ phases using least squares decomposition, a minimum of $M = K$ energy points is required as a necessary condition for $\mathbf{G}^0(\mathbf{\omega})$ to be invertible. Testing all possible $\mathbf{\omega} \in \Omega_M$ energy subsets for each $M < N$ requires long computation times. Consequently, we relax the problem by formulating it based on the Frank-Wolfe algorithm (30), where at each iteration, the problem is approximated linearly and minimized over a constrained convex region (details in Supplementary Text and fig. S1). We denote $\mathbf{\omega}_M^*$ the deducted optimal energy grid.

## Assessing the quality of factorization of the synthetic datacube

For a given time budget $T = t \times M$, we explore different acquisition scenarios. The noisy datacubes resulting from the numerical experiments are factorized. By assessing the quality of these factorizations, we sought to understand the best experimental strategy for a given $T$. To assess the factorization's ability to recover $\mathbf{p}^0$ from $\hat{\mathbf{p}}$, as a function of $M$, we apply a hard assignment to the calculated $\hat{\mathbf{p}}$s to obtain a representation of the classes by the distribution of their maximum factorization coefficients. We then compare this classified image with the ground truth, excluding the boundary between classes and air. The success rate is calculated as the percentage of classified voxels belonging to the same classes as the corresponding ground-truth voxels.

## Collecting a 3D image at the carbon K edge of a paint sample

We selected a highly radiation-sensitive sample from studies of historical paintings (31). We adopted a historically accurate reconstruction procedure (32) to prepare a sample made of successive layers of canvas, rabbit-skin glue, vinyl glue, and paint (see Materials and methods). All experiments were performed at an estimated flux of $8 \times 10^{12}$ ph/s at 199 mA. No physical change was observed on a large set of comparable samples with collection times below 4.5 s. We decided to add an extra margin for sample safety and set the time budget at $T = 1$ s. To design the ground truth of the spectral image: (i) we collected low-noise spectra of raw materials (canvas, collagen, vinyl, and paint) $I_k^0$, under cryogenic conditions at the carbon K edge (Fig. 1A and Supplementary Text); (ii) we collected the elastic signal from the sample (Fig. 1B) and classified it into five activation images (Fig. 1C); and (iii) we injected the $I_k^0$ into each respective activation image previously convolved at phase boundaries (Fig. 1D). The digital twin simulates the effects of (i) the number of energy points $M$, by subsampling the datacube, (ii) the acquisition time $t$, by applying a discrete Poisson random variable with parameter $t \times \alpha \times I_k^0$ (Fig. 2A). The $\alpha$ parameter was estimated experimentally (fig. S2). We applied the digital twin to a time budget $T = 1$ s for different $M$ taking values between $K = 4$ and $N = 54$. Energy points were selected for each $M$ according to regular energy grids traditionally used in hyperspectral mode. The projection onto the $N$ energy points of the $I_k^0$s sometimes resulted in uneven subsampling
<figure><img src="image_3.png" /><figcaption>**Fig. 1.** Construction of the ground truth of the spectral image of a radiosensitive sample. Experimental and numerical data are combined in three steps: (1) Phase spectra $I_k^0$ at the carbon K edge are obtained from raw materials (A). (2) The elastic signal (B) corrected for exponential attenuation effects is segmented into five activation images (C), generating a phase map without partial volume: 0 (air), 1 (canvas 1 and 2), 2 (collagen), 3 (vinyl), and 4 (paint). (3) A noise-free spectral volume is created by injecting the $I_k^0$s into the convoluted phase map $p_k^0(x)$, yielding the ground truth (D). For clarity, the image is displayed in 3D instead of 4D, with higher resolution along the x axis than in volume reconstruction.</figcaption></figure>
(fig. S3). For each *M*, by simulating a noisy image at the corresponding *t*, so that $M \times t = T$, and projecting onto the grids described above, we obtained a noisy synthetic image. These images were factorized using the least squares method, injecting the phase spectra $I_k^0$ (Fig. 1A), subsampled at *M* points on the corresponding energy grids. Classification efficiency was evaluated by comparing the success rate as a function of *M* (Fig. 2B). For small values of *M*, we

observed an unstable behavior of the success rate (Fig. 3A). This was attributed to the fact that the grid lacks important spectral features for some *Ms*, such as those at 288.5 and 289 eV (*M* = 7, 12, and 17). We then tested an experimental strategy commonly used by experimentalists working in multispectral mode, by selecting energy points corresponding to the maximum intensity of each pure phase spectrum (phase-maxima energy grid; Fig. 3D). The success rate of

<figure><img src="image_4.png" /><figcaption>**Fig. 2.** Schematic representation of the digital twin used in the simulation of experimental parameters and their optimization. (A) Digital twin, (B) optimization of experimental parameters.</figcaption></figure>

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

<figure><img src="image_6.png" /><figcaption>**Fig. 3.** Optimization of experimental parameters within a time budget. (A) Success rate as a function of the number of energy points (*M*) for *T* = 1 s. Curves represent the average of 100 numerical experiments, with the associated 95% confidence interval. The region where the success rate exceeds 95% is highlighted in gray. (B to E) Selection scenario of energy point grids, where the number of energy points equals the number of phases (*M* = *K*): optimal energy grid ([B] and (C)), phase-maxima grid (D), and regular grid (E). Phase maps (left) and selected energies (right). The optimal energy grid map marked with a star results from mean spatial filtering. Gray areas corresponding to partial volume and air are not scored.</figcaption></figure>
the phase-maxima energy grid at $M = K$ is of the order of 27%, only 1% more than the corresponding regular grid (Fig. 3E). We then applied the optimal energy grids (Fig. 4). The following success rate is higher than for multispectral and hyperspectral selection modes, up to double for $M = K$ (Fig. 3C). To assess the optimization of energy point selection for phase spectra, the upper limit Eq. 9 at $\omega^*$ was compared with numerical experiments (fig. S4). We applied a mean filter to the factorization coefficients obtained after projection onto the optimal energy grids. This denoising method increased the success rate by 35% (Fig. 3B). In a final step, we varied the time budget $T$, simulating $N-K$ collection conditions by adjusting $M$ so that $T = t \times M$ with $T \le 4.5$ s. The parameter $M$ took values between $K=4$ and $N=54$ for each $T$, each time using the corresponding optimal energy grid (Fig. 4), and by applying least squares upstream of mean filtering. The success rate increases with $T$, as expected (Fig. 5). We systematically observed a similar trend to that with $T=1$ s: The success rate increases as the number of energy points decreases and, consequently, as the acquisition time per point increases. The difference in success rate between a few energy points and a large number of energy points decreases as $T$ increases, highlighting the fact that for large time budgets, an optimal choice of $T$ distribution between $t$ and $M$ does not notably alter phase recovery, whereas for low $T$ values, this optimization can be a game changer. By arbitrarily setting the acceptable success rate at 95%, we can design an experiment for a time budget set at 1 s without having to reach the safety limit, provided we work in multispectral mode with an optimal energy grid and mean filtering.

DISCUSSION

The digital twin-based approach proves to be a powerful tool for quantitatively intercomparing experimental strategies. For a constant time budget of between 0.5 and 4.5 s, the success rate obtained increases with time per energy point (and therefore inversely with the number of energy points). This indicates that collecting whole spectra made up of a very large number of spectral bands

<figure><img src="image_7.png" /><figcaption>**Fig. 4. Optimal subsampling of the set of energies.** Optimal energy grids obtained using the Frank-Wolfe algorithm with 1000 iterations for each $M$ on the phase spectra obtained from raw materials. The optimal set of energy points, $\omega_M^*$, is highlighted by markers. Note that, here, once an energy point is selected, it is not discarded as $M$ increases. The algorithm therefore behaves similarly to a greedy approach.</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 5. Evaluation of the success rate as a function of number of energy points and time budget.** The success rate is plotted as a function of $M$ (A) and $T$ (B). Optimal energy grids and mean filtering were used as the optimal framework for phase recovery. The resulting curves are the average of 100 numerical experiments for each $M$. The region where the success rate exceeds 95% is highlighted in gray.</figcaption></figure>
(hyperspectral strategy) is not an optimal choice for segmenting the image, and that it is more efficient to rely on longer exposure at a smaller number of energies (multispectral strategy). With a time budget of 4.5 s, the choice between these two modalities has an impact limited to a few percent on the success rate. However, for low time budgets, limiting the number of energy points has a considerable impact on the success rate, leading to an increase of over 25%. In short, multispectral strategy becomes increasingly essential as the signal-to-noise ratio diminishes. In particular, it enabled 3D imaging of carbon speciation in a paint sample for T = 1 s. The method described here requires complete knowledge of the sample phase composition. Further development could incorporate the possibility of unknown or unanticipated phases, requiring acquisition at a greater number of energy points via dynamic bidirectional updates during experimental run.

The term “digital twin” has various meanings across and within scientific fields. Here, we refer to a virtual model of a real experimental process, generated by combining experimental and synthetic data, capable of simulating results to prescribe actions by numerically varying parameters across a space inaccessible to physical testing. The realistic noise model developed links the simulation and practical acquisition parameters. We can thus identify avenues for the development of future expert software to optimize experimental protocols. A certain degree of robustness would be necessary, as the results are highly dependent on the topology of the sample and the chemistry of the constituent phases. Several types of combination are conceivable, as the topology and phase spectra of the constituent phases can either be experimental or synthetic. For example, several strategies can be used to assign the $I_s^0$: (i) electron energy loss spectra of gas-phase molecules can be used or linearly combined (33); (ii) XRS signals can be simulated using software such as ERKALE (34), FEFF (35), FDMNES (36), StoBe-deMon (37, 38), or Quantum ESPRESSO (39–41), ideally adding the Compton contribution (27); and (iii) XRS spectra can be collected directly on reference materials with denoising to retain only the Compton and Gaussian signals after spectral decomposition, or using cryogenic conditions as done here. Similar simulations exist for other probe-matter interactions. Beyond the digital twin framework, by considering a sample sketch for the spatial map, a model requiring no real experiments is conceivable to define the sample topology.

In this work, our numerical experiments enabled us to define the optimum experimental parameters for a given time budget set at a maximum of T = 4.5 s, defined in terms of radiation damage threshold for a given flux. We have observed that classification for such a budget is satisfactory. Acquisition could even be performed at a lower signal-to-noise ratio. In recent years, numerous studies have shown that the first particle to interact with a given sample may already be a source of alteration. This calls into question the nature of the information gathered on certain systems that are only known through the delivery of high doses. What kind of knowledge could we obtain about these samples by working with just a few particles? In line with the ALARA (as low as reasonably achievable) concept of risk management, we could consider the shortest irradiation time to reach a classification threshold, to keep the radiation dose as low as possible. We believe that digital twin methods, such as the one proposed here, could open up a range of possibilities in the study of matter by irradiation, and not just photosensitive matter.

The development of x-ray imaging, made possible by the advances in efficient imaging detectors and micro- and nanofocusing optics from the 1990s onward, has made it possible to produce hyper- and multispectral images, giving rise to a sometimes heated debate between spectroscopists and imaging specialists on the advantages of the different approaches. Our result shows that maximizing the number of energy points (“collecting whole spectra”) may be a less successful strategy for segmenting an image than collecting optimal images at well-defined energies, not necessarily those that an instrumentalist would have selected in the first place. We show that a digital twin approach enables 3D speciation of a paint sample at the carbon K edge, which was previously considered challenging, if not impossible. This optimization strategy therefore opens new avenues for data collection on radiation-sensitive systems. While we show that acquisition parameters can be optimized during experimental planning, assuming knowledge of the constitutive phases, our work envisions a future where a digital twin-driven machine agent could dynamically guide the evolution of acquisition parameters in real time during data acquisition.

## MATERIALS AND METHODS

All XRS imaging and spectral data were collected on the ID20 beamline of the European Synchrotron Radiation Facility using the direct tomography configuration (23, 42) at a ring current of 200 mA. The incident photon beam energy was set at 12.9 keV with an energy resolution of 1.2 eV using a liquid nitrogen-cooled Si(111) double-crystal monochromator, coupled to a Si(311) postmonochromator. The beam is focused by a set of Kirkpatrick-Baez mirrors to a spot size of 12.5 µm by 12.5 µm ($V \times H$) for the raw materials and 21 µm by 28 µm for the painting sample at the sample position. It passes through a ($y, z$) point, and the scattered photons are then captured by spherically curved analyzer crystals in Johann geometry, which act as precise energy filters. The signal from the beam path through the sample is reflected by each crystal and collected by a 2D photon-counting detector with a pixel size of 55 µm, giving the third spatial dimension $x$. 2D ($x, z$) volume of the painting sample was collected by scanning the x-ray beam vertically ($z$ axis) over the sample surface at incident energy to target zero energy losses. Steps of 10 µm in vertical (stz) was used.

We used the IXStools library to convert the raw signals detected into a 2D volume for imaging and 1D for raw material spectra. The signals on the six modules are separated into 72 regions of interest (ROIs) corresponding to the 72 crystals. Each ROI is interpolated on the excitation energy grid and, for imaging, on a common $x$ axis with steps of 0.2 mm using nearest-neighbor interpolation. The raw materials were studied under cryogenic conditions (Supplementary Text).

### Paint layers

We made a historically accurate reconstruction reproducing the pictorial practice of a major contemporary postwar artist: Simon Hantaï (1922–2008). It was prepared by first applying multiple layers of rabbit skin glue (Laverdure) to a linen canvas (no.811, Sennelier). For each layer, the rabbit skin glue was left to dry overnight for full evaporation of water. Next, a second linen canvas (no.811, Sennelier) was glued onto the rabbit skin glue layer using a small amount of fish glue and rice starch mixture. Once dry, a thick layer of vinyl glue (Caparol) was applied, and left to dry overnight. A mixture of
acrylic binder (Laverdure) and Napthol Crimson organic pigment (Sennelier) was applied. Each material making up the stratigraphy was isolated and prepared for the collection of phase spectra (Supplementary Text).

## Supplementary Materials

This PDF file includes:

Supplementary Text

Figs. S1 to S4

## REFERENCES AND NOTES

1. Y. Garini, I. T. Young, G. McNamara, Spectral imaging: Principles and applications. *Cytometry* **A 69**, 735–747 (2006).

2. M. J. Khan, H. S. Khan, A. Yousaf, K. Khurshid, A. Abbas, Modern trends in hyperspectral image analysis: A review. *IEEE Access* **6**, 14118–14129 (2018).

3. N. Hagen, M. W. Kudenov, Review of snapshot spectral imaging technologies. *Opt. Eng.* **52**, 090901 (2013).

4. L. Lleó, J. Roger, A. Herrero-Langreo, B. Diezma-Iglesias, P. Barreiro, Comparison of multispectral indexes extracted from hyperspectral images for the assessment of fruit ripening. *J. Food Eng.* **104**, 612–620 (2011).

5. B. Lu, Y. He, P. D. Dao, Comparing the performance of multispectral and hyperspectral images for estimating vegetation properties. *IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens.* **12**, 1784–1797 (2019).

6. K.-S. Lee, W. B. Cohen, R. E. Kennedy, T. K. Maiersperger, S. T. Gower, Hyperspectral versus multispectral data for estimating leaf area index in four different biomes. *Remote Sens. Environ.* **91**, 508–520 (2004).

7. T. Kleynhans, D. W. Messinger, R. L. Easton, J. K. Delaney, Low-cost multispectral system design for pigment analysis in works of art. *Sensors* **21**, 5138 (2021).

8. V. E. Coslett, Radiation damage in the high resolution electron microscopy of biological materials: A review. *J. Microsc.* **113**, 113–129 (1978).

9. L. Bertrand, S. Schoëder, D. Anglos, M. B. H. Breese, K. Janssens, M. Moini, A. Simon, Mitigation strategies for radiation damage in the analysis of ancient materials. *TrAC Trends Anal. Chem.* **66**, 128–145 (2015).

10. L. Bertrand, S. Schoër, I. Joosten, S. M. Webb, M. Thoury, T. Calligaro, É. Anheim, A. Simon, Practical advances towards safer analysis of heritage samples and objects. *TrAC Trends Anal. Chem.* **164**, 117078 (2023).

11. M. Moini, C. M. Rollman, L. Bertrand, Assessing the impact of synchrotron X-ray irradiation on proteinaceous specimens at macro and molecular levels. *Anal. Chem.* **86**, 9417–9422 (2014).

12. A. Gimat, S. Schoër, M. Thoury, A.-L. Dupont, Degradation of historical paper induced by synchrotron X-ray technical examination. *Cellul.* **29**, 4347–4364 (2022).

13. E. F. Garman, R. L. Owen, Cryocooling and radiation damage in macromolecular crystallography. *Acta Crystallogr. Sect. D. Biol. Crystallogr.* **62**, 32–47 (2006).

14. B. Akabayov, C. J. Doonan, I. J. Pickering, G. N. George, I. Sagi, Using softer X-ray absorption spectroscopy to probe biological systems. *J. Synchrotron Radiat.* **12**, 392–401 (2005).

15. A. Meents, S. Gutmann, A. Wagner, C. Schulze-Briese, Origin and temperature dependence of radiation damage in biological samples at cryogenic temperatures. *Proc. Natl. Acad. Sci. U.S.A.* **107**, 1094–1099 (2010).

16. U. Bergmann, P. Glatzel, S. P. Cramer, Bulk-sensitive XAS characterization of light elements: From X-ray Raman scattering to X-ray Raman spectroscopy. *Microchem. J.* **71**, 221–230 (2002).

17. H. Fukui, L. T. Anh, M. Wada, N. Hiraoka, T. litaka, N. Hirao, Y. Akahama, T. Ifrifune, Electronic structure of dense solid oxygen from insulator to metal investigated with X-ray Raman scattering. *Proc. Natl. Acad. Sci. U.S.A.* **116**, 21385–21391 (2019).

18. R. Georgiou, C. J. Sahle, D. Sokaras, S. Bernard, U. Bergmann, J. P. Rueff, L. Bertrand, X-ray raman scattering: A hard X-ray probe of complex organic systems. *Chem. Rev.* **122**, 12977–13005 (2022).

19. W. Schülke, Electron dynamics by inelastic X-ray scattering, in *Oxford Series on Synchrotron Radiation* (Oxford Univ. Press, Oxford, 2007).

20. P. Gueriau, J. P. Rueff, S. Bernard, J. A. Kaddisy, S. Goler, C. J. Sahle, D. Sokaras, R. A. Wogelius, P. L. Manning, U. Bergmann, L. Bertrand, Noninvasive synchrotron-based X-ray raman scattering discriminates carbonaceous compounds in ancient and historical materials. *Anal. Chem.* **89**, 10819–10826 (2017).

21. C. J. Sahle, E. de Clermont Gallerande, N. Niskanen, A. Longo, M. Elbers, M. A. Schroer, C. Sternemann, S. Jahn, Hydration in aqueous NaCl. *Phys. Chem. Chem. Phys.* **24**, 16075–16084 (2022).

22. R. Georgiou, R. S. Popelka-Filcoff, D. Sokaras, V. Beltran, I. Bonaduce, J. Spangler, S. X. Cohen, R. Lehmann, S. Bernard, J. P. Rueff, U. Bergmann, L. Bertrand, Disentangling

the chemistry of Australian plant exudates from a unique historical collection. *Proc. Natl. Acad. Sci. U.S.A.* **119**, e2116021119 (2022).

23. S. Huotari, T. Pylkkänen, R. Verbeni, G. Monaco, K. Hämäläinen, Direct tomography with chemical-bond contrast. *Nat. Mater.* **10**, 489–493 (2011).

24. R. Georgiou, P. Gueriau, C. J. Sahle, S. Bernard, A. Mirone, R. Garrouste, U. Bergmann, J.-P. Rueff, L. Bertrand, Carbon speciation in organic fossils using 2D to 3D x-ray Raman multispectral imaging. *Sci. Adv.* **5**, eaaw5019 (2019).

25. P. Tack, E. de Pauw, B. Tkalcec, A. Longo, C. J. Sahle, F. Brenker, L. Vincze, Identification of the calcium, aluminum, and magnesium distribution within millimeter-sized extraterrestrial materials using nonresonant X-ray raman spectroscopy in preparation for the hayabusa2 sample return mission. *Anal. Chem.* **93**, 14651–14658 (2021).

26. Y. Mizuno, Y. Ohmura, Theory of X-Ray raman scattering. *J. Physical Soc. Japan* **22**, 445–449 (1967).

27. C. J. Sahle, A. Mirone, J. Niskanen, J. Inkinen, M. Krisch, S. Huotari, Planning, performing and analyzing X-ray Raman scattering experiments. *J. Synchrotron Radiat.* **22**, 400–409 (2015).

28. L. Gerward, Analytical approximations for X-ray attenuation coefficients. *Nucl. Instrum. Methods* **181**, 11–14 (1981).

29. C. Ponchut, J. M. Rigal, J. Clément, E. Papillon, A. Homs, S. Petitdemange, MAXIPIX, a fast readout photon-counting X-ray area detector for synchrotron applications. *J. Instrum.* **6**, C01069–C01069 (2011).

30. M. Frank, P. Wolfe, An algorithm for quadratic programming. *Nav. Res. Logist. Q.* **3**, 95–110 (1956).

31. L. Dalecky, I. Bonaduce, É. Anheim, J. L. NASA, M. L'Héronde, C. Morel, E. Catelli, S. Prati, Z. Li, L. Beck, I. Caffy, E. Delqué-Količ, A. Chevalier, L. Bertrand, A typical postwar workshop: Insights into Simon Hantai's oil paint palette. *J. Cult. Herit.* **66**, 511–522 (2024).

32. L. Carlyle, M. Witlox, Historically accurate reconstructions of artists' oil painting materials. *Art of the Past-Sources and Reconstructions*. (London, Archetype Publications, 2005), pp. 53–59.

33. A. Hitchcock, D. Mancini, Bibliography and database of inner shell excitation spectra of gas phase atoms and molecules. *J. Electron Spectrosc. Relat. Phenom.* **67**, 1–12 (1994).

34. J. Lehtola, M. Hakala, A. Sakko, K. Hämäläinen, ERKALE—A flexible program package for X-ray properties of atoms and molecules. *J. Comput. Chem.* **33**, 1572–1585 (2012).

35. J. J. Rehr, J. J. Kas, F. D. Vila, M. P. Prange, K. Jorissen, Parameter-free calculations of X-ray spectra with FEFF9. *Phys. Chem. Chem. Phys.* **12**, 5503–5513 (2010).

36. Y. Joly, C. Cavallari, S. A. Guda, C. J. Sahle, Full-potential simulation of X-ray raman scattering spectroscopy. *J. Chem. Theory Comput.* **13**, 2172–2177 (2017).

37. K. Hermann, StoBe Linux download (2022); https://edmond.mpg.de/citation?persistentId=doi:10.17617/3.YOLSFH.

38. A. Sakko, M. Hakala, J. A. Soininen, K. Hämäläinen, Density functional study of x-ray Raman scattering from aromatic hydrocarbons and polyfluorene. *Phys. Rev. B* **76**, 205115 (2007).

39. M. Taillefumier, D. Cabaret, A.-M. Flank, F. Mauri, X-ray absorption near-edge structure calculations with the pseudopotentials: Application to the *K* edge in diamond and *α*-quartz. *Phys. Rev. B* **66**, 195107 (2002).

40. P. Giannozzi, S. Baroni, N. Bonini, M. Calandra, R. Car, C. Cavazzoni, D. Ceresoli, G. L. Chiarotti, M. Cococciioni, I. Dabo, A. Dal Corso, S. de Gironcoli, S. Fabris, G. Fratesi, R. Gebauer, U. Gerstmann, C. Gougoussis, A. Kokalj, M. Lazzeri, L. Martin-Samos, N. Marzari, F. Mauri, R. Mazzarello, S. Paolini, A. Pasquarello, L. Paulatto, C. Sbraccia, S. Scandolo, G. Sclauzero, A. P. Seitsonen, A. Smogunov, P. Umari, R. M. Wentzcovitch, QUANTUM ESPRESSO: A modular and open-source software project for quantum simulations of materials. *J. Phys. Condens. Matter* **21**, 395502 (2009).

41. E. De Clermont Gallerande, D. Cabaret, G. Lelong, C. Brouder, M.-B. Attaiaa, L. Paulatto, K. Gilmore, C. J. Sahle, G. Radtke, First-principles modeling of x-ray Raman scattering spectra. *Phys. Rev. B* **98**, 214104 (2018).

42. S. Huotari, C. J. Sahle, C. Henriquet, A. al-Zein, K. Martel, L. Simonelli, R. Verbeni, H. Gonzalez, M. C. Lagier, C. Ponchut, M. Moretti Sala, M. Krisch, G. Monaco, A large-solid-angle X-ray Raman scattering spectrometer at ID20 of the European Synchrotron Radiation Facility. *J. Synchrotron Radiat.* **24**, 521–530 (2017).

**Acknowledgments:** L.B. and L.C. thank J. Reitzer for the contribution to the design of the figures. We thank E. de Clermont Gallerande, F. Gerbon, and B. Detlefs for assistance and support in using beamline ID20 at the ESRF, and A. Chevalier for the expertise in art materials. We thank A. Papasergio (PPSM/University of Bologna) and C. Coustet (IPANEMA, Université Paris-Saclay) for the help in preparing the samples. L.B. thanks U. Bergmann (University of Wisconsin-Madison) for valuable discussion about this work. **Funding:** L.C., L.B., L.D., and S.X.C. acknowledge funding provided through the GoGreen project of the European Commission (GA no. 101060768). L.D. was supported by a PhD grant by ENS Paris-Saclay, with contributions by PPSM and Centre Borelli. We acknowledge the European Synchrotron Radiation Facility (ESRF) for provision of synchrotron radiation facilities under long term project HG-171 at beamline ID20. **Author contributions:** Conceptualization: L.B. and A.D. Methodology: L.B., A.D., S.X.C., and L.C. Software: A.D., and L.C. Validation: L.B., A.D.,
and L.C. Formal analysis: L.B., A.D., S.X.C., and L.C. Investigation: L.B., L.C., L.D., S.H., and C.S.

Resources: L.D., S.H., C.S., and A.M. Data curation: L.C., A.D., and S.X.C. Writing—original draft:

L.C., L.B., and A.D. Writing—review and editing: L.C., L.B., A.D., L.D., C.S., S.H., A.M., and S.X.C.

Visualization: L.C., L.B., and A.D. Supervision: L.B. and A.D. Project administration: L.B.

Funding acquisition: L.B. **Competing interests:** The authors declare that they have no

competing interests. **Data and materials availability:** Data and code used for this article

have been deposited on Zenodo (https://doi.org/10.5281/zenodo.16275117). All other data

needed to evaluate the conclusions in the paper are present in the paper and/or the
Supplementary Materials.

Submitted 6 February 2025

Accepted 10 September 2025

Published 10 October 2025

10.1126/sciadv.adw5444