Testing the Accuracy of the Calculation of Gold Leaf Thickness by MC Simulations and MA-XRF Scanning

Featured Application: Characterization of surfaces in multilayered structures is a requirement in many application areas. Such characterization should be nondestructive, and, in some cases, it must be performed in situ. This is the case of precious Cultural Heritage samples. The use of X-ray ﬂuorescence analysis is currently one of the few solutions. When a large surface must be characterized, a MA-XRF scanning system can also be employed. Abstract: The use of X-ray ﬂuorescence (XRF) scanning systems has become a common practice in many application sectors. In multistratiﬁed and heterogeneous samples, the simple analysis of an XRF spectrum as a response of the entire sample is not reliable, so di ﬀ erent spectral analysis techniques have been proposed to detect the presence of surface stratiﬁcation. One commonly studied case is that of gilding, i.e., the presence of a superimposing gold-leaf layer. The observation of changes in the net peak ratios of a single element or of several elements in an XRF spectrum is a well-developed practice, but is still not used in the case of XRF scanning (macro-X-Ray ﬂuorescence scanning, MA-XRF), a technique that can be described as the extrapolation of XRF spot analysis to a second dimension, scanning a sample surface instead. This practice can yield information on the overlaying layer thickness, if some properties of the sample are known—or estimated—beforehand, e.g., the overlapping layer’s chemical composition and the matrix e ﬀ ect contribution from the bulk material ( thick ratio ). This work proposes the use of an algorithm to calculate the thickness distribution of a superimposing gold layer accurately and automatically through the di ﬀ erential attenuation method by using MA-XRF datasets in a total noninvasive manner. This approach has the clear advantage over the traditional spot sampling of allowing the generation of a surface heightmap to better visualize and interpret the data, as well as a considerably larger sample space. Monte Carlo simulations were used to verify the inﬂuence of the medium used to adhere the gold leaves to the substrate and to generate known spectra to assess the algorithm’s accuracy. dataset a advantages, limitations.


Introduction
The use of metal coatings on surfaces is a very common practice in different technological sectors with the aim of either protecting the surface or to achieve specific material properties, such as in electronics, photonics, and biomaterials [1]. The determination of gold leaf thickness for heritage purposes is a practice that has been performed for decades [2]. The information yielded by such investigations can give further insight into the technology, manufacturing techniques, and binding mechanisms between the gold leaf and the artwork it was applied to [3,4]-be it panel paintings, canvases, gilded metals, or frescoes [2,5]. When establishing restoration protocols, this information is of great value, so the artwork can be restored to as close as possible to its original state. Moreover, technological traits of the manufacturing techniques of gold leaves can serve as anchors for the establishment of chronologies and different workshops.
Customarily, the determination of gold leaf thickness is performed by microsampling and cross-section analysis, a microdestructive approach that is not always feasible (or desired) when dealing with objects of cultural heritage [6,7]. An alternative to microsampling is the use of the differential attenuation of fluorescence radiation [8], basing on the concatenation effects of (a) the production of photons in the sample's substrate and (b) their subsequent attenuation by the gilding's uppermost layer. This approach has been previously applied to a series of objects of cultural heritage [9][10][11][12]. Nevertheless, archaeological materials and works of art are known to be considerably heterogeneous, i.e., the substrate underneath the gold foil can differ throughout the sample, so the study of only one or few points on the surface may yield biased information [8,13].
Furthermore, different mordants used to adhere the gold foils or leaves to the substrate surface and protective layers further applied to the finished gilded surface can enhance the attenuation effects. Nardes et al. [9], when investigating gold foils protected with mica, demonstrated that the addition of a protective layer can introduce considerable errors to the estimated mean thickness by the different attenuation method.
Macro-X-ray fluorescence scanning (MA-XRF) is a nondestructive and widespread technique in the field of heritage science, which provides a large set of spectra and can generate elemental distribution maps [14][15][16][17]. Using its dataset for applying the differential attenuation method is an obvious approach to improve sampling space and verify the existence of substrate inhomogeneities, avoiding biases, and obtaining a more accurate mean gilding thickness value. Unfortunately, the evaluation and manual inspection of each spectrum for a precise determination of the net peak areas is a time consuming operation; therefore, the development of an automated algorithm for processing the large data provided by MA-XRF scans, giving each spectrum net peak ratios, is required [18].
In this study, to determine the influence of a binding interface and apply the differential attenuation method to MA-XRF datasets representing gilded artworks (paintings), an algorithm was developed to automatically extract the net peak areas, generate the elemental distribution maps, and to automatically calculate the overlapping layer thickness at each sampled point. The dataset used was obtained by scanning one gilded sample with known parameters crafted to test the capabilities and limitations of the proposed methodology and algorithm. Monte Carlo simulations were performed to generate known spectra and test the outputs of the algorithm as well as to assess the influence of an intermediate resin layer between the gold leaf and the substrate and the continuum contribution.

Materials and Methods
In order to test the proposed methodology as a noninvasive and more accurate determination method of gold leaf mean thickness, a sample with known parameters was prepared. Monte Carlo simulations, representing analytical volumes of interest sufficiently similar to the sample, were performed with the X-ray Monte Carlo (XRMC) package [19]. The sample was analyzed by MA-XRF scanning, and the dataset generated was used to automatically calculate the mean gilding thickness. To obtain the most representative data, the thickness calculations were performed over specific areas of interest (AoI), avoiding matrix composition inhomogeneities that are visible in the elemental distribution maps. The matrix thick ratio was obtained by directly measuring the substrate (regions A and D).

Sample Preparation
The sample prepared can be seen in Figure 1 below. The base, a plywood piece of 91 × 72 mm 2 , was polished with 250 grit sandpaper. The plywood was then covered with several layers of titanium dioxide substrate to create a sufficiently thick layer and assure it can be considered infinitely thick (>150 µm). This means that all X-ray photons from the beam interact inside the sample, thus allowing a better estimation of the gold leaf thickness. In real cases, it is also common to find lead-or zinc-based preparation layers, especially in historical artworks [20]. Titanium white is a well-known pigment widely used in contemporary artworks, and it was chosen due to its accessibility (TiO 2 powder can be readily found) and nontoxicity when compared to lead. Moreover, Ti-K lines are well separated from Au-L lines, differently from zinc K-lines. In this way, titanium is the ideal candidate for the proposed experiments' substrate.
The preparation layer (substrate) was made by mixing roughly 10 parts of TiO 2 powder (produced by Abralux Colori Beghè s.r.l, Costelmare (CO), Italy) with seven parts of water and one part of vinyl-based glue (deSmovil 72 -produced by Italchimici s.r.l, Trevi (PG), Italy) and was left to dry for 24 h. Afterwards, one thin layer of gilding glue ("missione per oro in fogli" -produced by Primo Pennesi e F.lli s.o.s, Rome (RM), Italy) was applied over regions A and B ( Figure 1). When the glue was sufficiently dry, the gold leaves provided by CTS Europe ® , with an approximate thickness ranging from 0.15 to 0.25 µm, were applied on top of it. The leaves are 98.5% pure with no specifications on the impurities. Other pieces of gold leaves were applied to region C by wetting the substrate with a soft brush and then sticking the leaves directly to it, devoid of any gilding glue. The small leaf fragments, evident in the right portion of the area of interest (AoI) A, are a product of the lack of the craftsman expertise in gilding, resulting in the accidental deposition of leaf fragments in that portion during the gilding process. Nonetheless, the central and upper left regions of AoI A are devoid of gold and still usable for its purpose.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 3 of 12 of interest (AoI), avoiding matrix composition inhomogeneities that are visible in the elemental distribution maps. The matrix thick ratio was obtained by directly measuring the substrate (regions A and D).

Sample Preparation
The sample prepared can be seen in Figure 1 below. The base, a plywood piece of 91 × 72 mm 2 , was polished with 250 grit sandpaper. The plywood was then covered with several layers of titanium dioxide substrate to create a sufficiently thick layer and assure it can be considered infinitely thick (>150 μm). This means that all X-ray photons from the beam interact inside the sample, thus allowing a better estimation of the gold leaf thickness. In real cases, it is also common to find lead-or zincbased preparation layers, especially in historical artworks [20]. Titanium white is a well-known pigment widely used in contemporary artworks, and it was chosen due to its accessibility (TiO2 powder can be readily found) and nontoxicity when compared to lead. Moreover, Ti-K lines are well separated from Au-L lines, differently from zinc K-lines. In this way, titanium is the ideal candidate for the proposed experiments' substrate.
The preparation layer (substrate) was made by mixing roughly 10 parts of TiO2 powder (produced by Abralux Colori Beghè s.r.l, Costelmare (CO), Italy) with seven parts of water and one part of vinyl-based glue (deSmovil 72 -produced by Italchimici s.r.l, Trevi (PG), Italy) and was left to dry for 24 h. Afterwards, one thin layer of gilding glue ("missione per oro in fogli" -produced by Primo Pennesi e F.lli s.o.s, Rome (RM), Italy) was applied over regions A and B ( Figure 1). When the glue was sufficiently dry, the gold leaves provided by CTS Europe ® , with an approximate thickness ranging from 0.15 to 0.25 μm, were applied on top of it. The leaves are 98.5% pure with no specifications on the impurities. Other pieces of gold leaves were applied to region C by wetting the substrate with a soft brush and then sticking the leaves directly to it, devoid of any gilding glue. The small leaf fragments, evident in the right portion of the area of interest (AoI) A, are a product of the lack of the craftsman expertise in gilding, resulting in the accidental deposition of leaf fragments in that portion during the gilding process. Nonetheless, the central and upper left regions of AoI A are devoid of gold and still usable for its purpose.

Monte Carlo Simulations
XRF spectra simulations were performed with a modified version of the XRMC package, version 6.4.1., a Monte Carlo algorithm based on the xraylib database [21]. In this custom version, it is possible to simulate rough surfaces as well [22]. This package is capable of simulating interactions up to any order. For the present work, a threshold was set at the third order, since, as the order increases, errors in the atomic parameters used in the interaction's simulation are accumulated. Therefore, for higher interaction orders, the simulated value loses its significance. This code can simulate several types of fluorescence lines, including M-lines, also allowing the simulation of more complex sample geometries, surface roughness, and the characterization of both structure and elemental composition within a multilayered structure [19,22,23].
Regions A, B, C, and D depicted in Figure 1 were simulated. For the present simulations, all irradiated volumes were simulated as a stack of parallel planes. For the A region, a bilayered volume was considered, with a 0.5 cm thick TiO 2 substrate and a 50 µm thick resin layer (11 wt% H, 11 wt% O and 78 wt% C). The substrate thickness is enough to assure this layer behaves as an infinitely thick layer. It is well-known that above the infinitely thick threshold, the exceeding thickness can be disregarded as it does not affect the outputs.
Region B was simulated analogously to region A with the addition of an uppermost 0.20 µm thick 98.5% gold 1.5% Ag layer. Region C was simulated as a bilayered structure with a 0.5 cm thick TiO 2 substrate and a 0.20 µm thick 98.5% gold 1.5% Ag layer. Lastly, region D was simulated as a monolayered structure composed solely by a 0.5 cm thick TiO 2 substrate. The simulated resin thickness was exaggerated (50 µm) to clearly highlight any influence caused by it. The gold layer thickness was chosen as an average of the leaves used in the real sample. Both measured and simulated data were analyzed in an analogous way.
The excitation tube profile used in the simulations was of an Ag-anode tube, while the system geometry was the same as the physical analytical system, 27 • between tube and the sample normal. The tube and detector were positioned symmetrically.

MA-XRF Scanning
The MA-XRF scanning was performed with a portable prototype scanning system built in a collaboration between the Istituto Nazionale di Fisica Nucleare (INFN)-Roma TRE and a private company, Ars Mensurae. The system features an exchangeable and modular scanning head and different x-y scanning stages. The head components used for the present analysis were: one low-power (4W) Moxtek ® Ta-target tube (collimated to 1 mm) and one AMPTEK ® 123SDD detector having an active area of 25 mm 2 and a thickness of 500 µm. The energy resolution is of 125 eV @ the Mn-K α line (5.9 KeV). The scanning stage used was the smaller, portable version, capable of holding samples up to 200 × 200 mm 2 in dimension [17]. The total scanned area was 83 × 40 mm 2 ( Figure 1) and the dwell-time was 3 s. Tube voltage and current were set to 35 KV and 17 µA, respectively.

Peak Area Calculation
A precise determination of the net area of peaks of interest is fundamental for an accurate thickness estimation through the differential attenuation method [8]. To achieve such precision, XRF spectra are usually manually inspected. This approach is feasible when analysing few or dozens of spectra, but impracticable when dealing with MA-XRF datasets composed of at least thousands of spectra. To overcome this problem, an algorithm was proposed to automatically determine the net peak areas of interest.
The spectrum evaluation is performed in three steps: (a) calculate the full-width at half maximum (FWHM) for a gaussian centred at the theoretical peak position, (b) search for a peak maximum in a 2*FWHM window, verify if it matches with the theoretical centre, and (c) check the signal-to-noise ratio (SNR) criteria. If the peak maximum is slightly offset due to calibration issues, the FWHM window is recentred. The theoretical values used for centring and locating the peaks are obtained from the xraylib package [20]. Background contribution is calculated following the Statistical Non-Linear Iterative Peak Clipping (SNIPBG) method [24] and the parameters are set by evaluating randomly sampled spectrum instead of a derived spectrum.
Since MA-XRF spectra usually present low statistics, the net area is calculated over the raw data. No fitting is performed to save on computational time. Therefore, the proposed method requires that the peaks of interest be well separated and defined, as no deconvolution method is yet implemented.

Differential Attenuation
The excited atoms of each element emit X-ray photons at different energies that can be synthetically categorized into the so called K α and K β or L α , L β and L γ lines when K and L shells are involved. When a sample is said to be infinitely thin, i.e., when secondary interactions are negligible, the ratio between these lines for a single element can be calculated and are tabulated [25]. When considering secondary interactions and matrix effects, the ratio between the emission lines changes exponentially with increasing material thickness until reaching a plateau; from this point onwards, the sample can be considered infinitely thick. If the element is in a mixture, the thick ratio can still be calculated, but the weight percentage of each present element must be known. An alternative method is to directly measure the intensity ratios from an XRF spectrum taken from the exposed substrate which applies for samples for which the exact composition cannot be fully constrained.
If the emitted X-rays from the sample's substrate traverse a superimposing layer, they will be attenuated proportionally to their energy and the superimposing layer's thickness and composition. In this way, by comparing the ratio between two distinct lines before and after attenuation, one can estimate the thickness of the traversed superimposing layer. The differential attenuation theoretical background has been extensively discussed elsewhere [8,12,18,26].
In the present work, the ratios between Ti-K α and Ti-K β were evaluated. Figure 2 shows the areas sampled for measuring the thick ratio. For the direct substrate, it was measured as an average mean of several spots from Region D and from one spectrum taken with a longer acquisition time (30 s). The mean value obtained was 5.31 and that from the single spectrum was 5.32. When measuring the substrate with resin (AoI A) the mean value was slightly lower: 5.20.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 5 of 12 the FWHM window is recentred. The theoretical values used for centring and locating the peaks are obtained from the xraylib package [20]. Background contribution is calculated following the Statistical Non-Linear Iterative Peak Clipping (SNIPBG) method [24] and the parameters are set by evaluating randomly sampled spectrum instead of a derived spectrum.
Since MA-XRF spectra usually present low statistics, the net area is calculated over the raw data. No fitting is performed to save on computational time. Therefore, the proposed method requires that the peaks of interest be well separated and defined, as no deconvolution method is yet implemented.

Differential Attenuation
The excited atoms of each element emit X-ray photons at different energies that can be synthetically categorized into the so called Kα and Kβ or Lα, Lβ and Lγ lines when K and L shells are involved. When a sample is said to be infinitely thin, i.e., when secondary interactions are negligible, the ratio between these lines for a single element can be calculated and are tabulated [25]. When considering secondary interactions and matrix effects, the ratio between the emission lines changes exponentially with increasing material thickness until reaching a plateau; from this point onwards, the sample can be considered infinitely thick. If the element is in a mixture, the thick ratio can still be calculated, but the weight percentage of each present element must be known. An alternative method is to directly measure the intensity ratios from an XRF spectrum taken from the exposed substrate which applies for samples for which the exact composition cannot be fully constrained.
If the emitted X-rays from the sample's substrate traverse a superimposing layer, they will be attenuated proportionally to their energy and the superimposing layer's thickness and composition. In this way, by comparing the ratio between two distinct lines before and after attenuation, one can estimate the thickness of the traversed superimposing layer. The differential attenuation theoretical background has been extensively discussed elsewhere [8,12,18,26].
In the present work, the ratios between Ti-Kα and Ti-Kβ were evaluated. Figure 2 shows the areas sampled for measuring the thick ratio. For the direct substrate, it was measured as an average mean of several spots from Region D and from one spectrum taken with a longer acquisition time (30 s). The mean value obtained was 5.31 and that from the single spectrum was 5.32. When measuring the substrate with resin (AoI A) the mean value was slightly lower: 5.20. The gold leaf thickness at each point was calculated following Equation (1) [9,18]: where Ψ is the X-ray tube and detector angle with the sample surface, μL is surface layer linear attenuation coefficient, is the Ti Kα/Kβ ratio recorded at the pixel and is the corresponding thick ratio. The statistical error on the measured Ti Kα/Kβ ratio is: The gold leaf thickness at each point was calculated following Equation (1) [9,18]: where Ψ is the X-ray tube and detector angle with the sample surface, µ L is surface layer linear attenuation coefficient, I K α /I K β is the Ti K α /K β ratio recorded at the pixel and I K α /I K β thick is the corresponding thick ratio.
The statistical error on the measured Ti K α /K β ratio is: where R = Appl. Sci. 2020, 10, 3582 6 of 12 Therefore, the resolving power and error can be calculated through Equations (3) and (4) below: where, in Equation (4), subindexes stat, samp, and inst correspond to the statistical, sample, and instrumentation variances, respectively. The latter is the variance sum of geometrical factors and calibration (matrix thick ratio) uncertainties. Figure 3 shows the AoIs where thickness calculations were performed. Brighter spots present in the outbounds of AoI B are probably due to manufacturing defects and indicate a more intense signal of gold where attenuation effects are probably higher. For this reason, brighter spots were avoided. Area of Interest C was selected from the sample's region C rightmost portion (Figure 1). Manufacturing defects are clearly present in the lower-right part and were left outside. A total of 3320 spectra were evaluated to calculate the net peak areas and generate the elemental distribution maps. For the thickness calculation over the whole gilded area, 1368 spectra were considered; for AoIs B and C, 965 spectra were considered.

Results and Discussion
Appl. Sci. 2020, 10, x FOR PEER REVIEW 6 of 12 where R = .
Therefore, the resolving power and error can be calculated through Equations (3) and (4) below: where, in Equation (4), subindexes stat, samp, and inst correspond to the statistical, sample, and instrumentation variances, respectively. The latter is the variance sum of geometrical factors and calibration (matrix thick ratio) uncertainties. Figure 3 shows the AoIs where thickness calculations were performed. Brighter spots present in the outbounds of AoI B are probably due to manufacturing defects and indicate a more intense signal of gold where attenuation effects are probably higher. For this reason, brighter spots were avoided. Area of Interest C was selected from the sample's region C rightmost portion ( Figure 1). Manufacturing defects are clearly present in the lower-right part and were left outside. A total of 3320 spectra were evaluated to calculate the net peak areas and generate the elemental distribution maps. For the thickness calculation over the whole gilded area, 1368 spectra were considered; for AoIs B and C, 965 spectra were considered. The simulated spectra obtained from MC simulations were analyzed, and the mean thickness value obtained disregarding the resin layer (volume simulating region C) was 0.19 ± 0.01 μm, demonstrating that the proposed algorithm and methodology is accurate and precise when evaluating the simulated spectra. High precision was expected when evaluating the simulated spectra, as the linear attenuation parameters for Equation (1) could be exactly set. When evaluating the simulated spectra representing region B, where a 50 μm thick resin layer is present as an adhesive intermediate layer, the obtained gold leaf thickness is almost doubled: 0.35 ± 0.01 μm. This may be due to the logarithmic nature of Equation (1), where small changes in the measured peak ratio cause large changes in the calculated thickness value, highlighting the need for a proper calculation or measurement of the substrate thick ratio. For the calculations, the parameters of Equation (1) remained unchanged, since the linear attenuation factors considered are solely those of the layer whose thickness is being estimated (i.e., the gold layer) and the thick ratio is that of the substrate. Therefore, any further attenuation titanium lines have undergone, caused by the resin layer, could not be The simulated spectra obtained from MC simulations were analyzed, and the mean thickness value obtained disregarding the resin layer (volume simulating region C) was 0.19 ± 0.01 µm, demonstrating that the proposed algorithm and methodology is accurate and precise when evaluating the simulated spectra. High precision was expected when evaluating the simulated spectra, as the linear attenuation parameters for Equation (1) could be exactly set. When evaluating the simulated spectra representing region B, where a 50 µm thick resin layer is present as an adhesive intermediate layer, the obtained gold leaf thickness is almost doubled: 0.35 ± 0.01 µm. This may be due to the logarithmic nature of Equation (1), where small changes in the measured peak ratio cause large changes in the calculated thickness value, highlighting the need for a proper calculation or measurement of the substrate thick ratio. For the calculations, the parameters of Equation (1) remained unchanged, since the linear attenuation factors considered are solely those of the layer whose thickness is being estimated (i.e., the gold layer) and the thick ratio is that of the substrate. Therefore, any further attenuation titanium lines have undergone, caused by the resin layer, could not be accounted and systematic errors were introduced, exaggerated by the logarithmic function. A workaround has been proposed by Nardes et al. [9], modifying Equation (1) to account for additional attenuation effects caused by a coating layer. In Figure 4, a significant decrease in the Ti-K-lines signal intensity can already be appreciated while traversing a 10 µm thick resin layer. At 50 µm thickness, about 20% of the Ti-K α signal is absorbed by the layer.

Results and Discussion
accounted and systematic errors were introduced, exaggerated by the logarithmic function. A workaround has been proposed by Nardes et al. [9], modifying Equation (1) to account for additional attenuation effects caused by a coating layer. In Figure 4, a significant decrease in the Ti-K-lines signal intensity can already be appreciated while traversing a 10 μm thick resin layer. At 50 μm thickness, about 20% of the Ti-Kα signal is absorbed by the layer. The calculated average thickness distribution obtained for AoI B and C are given in Table 1. Different from what was observed in the simulated spectra, there is no significant or immediately observable difference between the values (considering the standard deviation). This may be due to the statistics of the MA-XRF dataset, presenting a higher number of samples, and spectra with lower count statistics compared to traditional XRF spot analysis. Firstly, it must be noticed that the effective thickness of the resin applied to the substrate after drying can be considerably smaller than the 50 μm used in the simulations, as previously mentioned. Secondly, the simulated resin layer is considered as a dense and homogeneous layer, disregarding the existence of pores or air between resin and gold leaf, which can result in a further increase in the attenuation effects compared to what is experimentally observed. The effects of a thinner resin layer and the presence of air (considering the sample was not burnished) are competitive; a thinner layer results in less observable effects in the final results as the presence of air reduces the layer (in this case resin + gold leaf) linear attenuation coefficients, resulting in a slightly overestimated result. The influence exerted by the background contribution over the calculated mean thickness was also tested with Monte Carlo simulated spectra. Figure 5 shows a linear fitting comparison between values obtained using the SNIPBG method and without considering any background contribution. Different gold leaf thicknesses were simulated, from 0.25 μm up to 2.0 μm, on top of a pure lead The calculated average thickness distribution obtained for AoI B and C are given in Table 1. Different from what was observed in the simulated spectra, there is no significant or immediately observable difference between the values (considering the standard deviation). This may be due to the statistics of the MA-XRF dataset, presenting a higher number of samples, and spectra with lower count statistics compared to traditional XRF spot analysis. Firstly, it must be noticed that the effective thickness of the resin applied to the substrate after drying can be considerably smaller than the 50 µm used in the simulations, as previously mentioned. Secondly, the simulated resin layer is considered as a dense and homogeneous layer, disregarding the existence of pores or air between resin and gold leaf, which can result in a further increase in the attenuation effects compared to what is experimentally observed. The effects of a thinner resin layer and the presence of air (considering the sample was not burnished) are competitive; a thinner layer results in less observable effects in the final results as the presence of air reduces the layer (in this case resin + gold leaf) linear attenuation coefficients, resulting in a slightly overestimated result. The influence exerted by the background contribution over the calculated mean thickness was also tested with Monte Carlo simulated spectra. Figure 5 shows a linear fitting comparison between values obtained using the SNIPBG method and without considering any background contribution. Different gold leaf thicknesses were simulated, from 0.25 µm up to 2.0 µm, on top of a pure lead substrate. Lead L-lines present a considerably higher signal-to-noise ratio that can better highlight the background contribution effects. It must be observed that the simulation setup used to account for background contributions does not represent the experimental setup. Its purpose was to emphasize any contributions, if present, and point out if corrections must be made and when.
It can be observed that in the lower end, for very thin leaves, the background contribution does not significantly impact the results. As the overlapping layer thickness increases, discrepancies start to appear, and a background estimation method is required to achieve the best results.
Appl. Sci. 2020, 10, x FOR PEER REVIEW 8 of 12 substrate. Lead L-lines present a considerably higher signal-to-noise ratio that can better highlight the background contribution effects. It must be observed that the simulation setup used to account for background contributions does not represent the experimental setup. Its purpose was to emphasize any contributions, if present, and point out if corrections must be made and when. It can be observed that in the lower end, for very thin leaves, the background contribution does not significantly impact the results. As the overlapping layer thickness increases, discrepancies start to appear, and a background estimation method is required to achieve the best results. To assess if any difference would be noticed in the experimental data (acquired with a Ta-target tube), and because the simulated data ( Figure 5) was obtained using a different, Ag-target tube profile, the prepared sample was also evaluated without background subtraction. This factor can be crucial when verifying the influence of background effects on the thickness calculations, as different tubes will present different emission spectra. In any case, the mean thickness values were not significantly impacted. AoI B + AoI C mean thickness, considering the background contribution, was 0.18 ± 0.10 μm vs. 0.17 ± 0.10 μm without it. Moreover, the relatively low counts of the present MA-XRF dataset are not enough to create an appreciable continuum which, in this case, can be disregarded.
A 3D-heightmap of the thickness values calculated for AoIs B and C is shown in Figure 6. A concentration of slightly higher values is observed in the rightmost part of AoI C.
The grouped bins histograms of AoI B and C are shown in Figure 7. The distributions shown in the histograms exhibit an asymmetric shape (with skewness values 0.51 and 0.85, respectively) and a deviation from a normal distribution is evident for AoI C (kurtosis 1.1). As for AoI B, it can be observed that the calculated thicknesses are slightly inaccurate (more than 50% of the calculated thicknesses are lower than 0.15 μm). However, it is useful to underline that the means in Table 1 are calculated from histograms and, therefore, can be affected by the distribution shape as underlined above. The inaccurate results may be, in a first approach, attributed to the presence of resin, which presents significantly different physical properties compared to the gold leaves, introducing several outliers to the distribution, and changing the histograms' appearance (truncated distribution). The To assess if any difference would be noticed in the experimental data (acquired with a Ta-target tube), and because the simulated data ( Figure 5) was obtained using a different, Ag-target tube profile, the prepared sample was also evaluated without background subtraction. This factor can be crucial when verifying the influence of background effects on the thickness calculations, as different tubes will present different emission spectra. In any case, the mean thickness values were not significantly impacted. AoI B + AoI C mean thickness, considering the background contribution, was 0.18 ± 0.10 µm vs. 0.17 ± 0.10 µm without it. Moreover, the relatively low counts of the present MA-XRF dataset are not enough to create an appreciable continuum which, in this case, can be disregarded.
A 3D-heightmap of the thickness values calculated for AoIs B and C is shown in Figure 6. A concentration of slightly higher values is observed in the rightmost part of AoI C.
The grouped bins histograms of AoI B and C are shown in Figure 7. The distributions shown in the histograms exhibit an asymmetric shape (with skewness values 0.51 and 0.85, respectively) and a deviation from a normal distribution is evident for AoI C (kurtosis 1.1). As for AoI B, it can be observed that the calculated thicknesses are slightly inaccurate (more than 50% of the calculated thicknesses are lower than 0.15 µm). However, it is useful to underline that the means in Table 1 are calculated from histograms and, therefore, can be affected by the distribution shape as underlined above. The inaccurate results may be, in a first approach, attributed to the presence of resin, which presents significantly different physical properties compared to the gold leaves, introducing several outliers to the distribution, and changing the histograms' appearance (truncated distribution). The resin presence is not accounted for by the measuring system (Equation (1)), and, as previously discussed, will introduce systematic under-or overestimations.
Therefore, the overall average calculated in AoI B region (0.16 µm) is probably a systematic underestimation of the true thickness, which can be due to many factors, such as the presence of a resin adhesive (in the resin-less region the calculated mean thickness is 0.23 µm) or, on a second approach, simply due to roughness effects (not taken into consideration). For the latter, variations in the impinging radiation and output angles change the absolute path travelled by the X-ray beam and fluorescence lines, respectively. This variation, even small, can introduce errors in the I K α /I K β / I K α /I K β thick factor that are emphasized by the logarithmic function in Equation (1), which, compared to the considerably small value being evaluated, may appear considerably high.
In addition, the histogram shown as the possible distribution is a truncated one, which can be presumed because all the values are calculated normalizing the peaks ratio to an estimated value I K α /I K β thick . Area of interest C, devoid of resin, presented better results with a relatively symmetric histogram with a large right tail. The tailing may be due to the concentration of greater thickness values observed at the rightmost portion of AoI C (Figure 6), which in turn may have resulted from fabrication defects present in the substrate (lower Ti signal and darker region in the rightmost part- Figure 2). The presence of resin disturbs the results, causing a systematic error. Furthermore, when recalculating the mean thickness for AoI B considering a thick ratio, I K α /I K β thick term in Equation (1), sampled from region A (Figure 2), the mean value decreases only slightly.
resin presence is not accounted for by the measuring system (Equation (1)), and, as previously discussed, will introduce systematic under-or overestimations. Therefore, the overall average calculated in AoI B region (0.16 μm) is probably a systematic underestimation of the true thickness, which can be due to many factors, such as the presence of a resin adhesive (in the resin-less region the calculated mean thickness is 0.23 μm) or, on a second approach, simply due to roughness effects (not taken into consideration). For the latter, variations in the impinging radiation and output angles change the absolute path travelled by the X-ray beam and fluorescence lines, respectively. This variation, even small, can introduce errors in the factor that are emphasized by the logarithmic function in Equation (1), which, compared to the considerably small value being evaluated, may appear considerably high.
In addition, the histogram shown as the possible distribution is a truncated one, which can be presumed because all the values are calculated normalizing the peaks ratio to an estimated value . Area of interest C, devoid of resin, presented better results with a relatively symmetric histogram with a large right tail. The tailing may be due to the concentration of greater thickness values observed at the rightmost portion of AoI C (Figure 6), which in turn may have resulted from fabrication defects present in the substrate (lower Ti signal and darker region in the rightmost part- Figure 2). The presence of resin disturbs the results, causing a systematic error. Furthermore, when recalculating the mean thickness for AoI B considering a thick ratio, term in Equation (1), sampled from region A (Figure 2), the mean value decreases only slightly. The calculated statistical error in the thickness determination is about 0.07 μm (Equation (3)). Therefore, what we observe in the measured thicknesses in both AoI B and C is mostly statistical fluctuation of data. However, the observed mean thickness shift (Table 1), which is less than the standard deviation, is still valid. It is worth noting that the 0.07 μm shift, exactly the same as the statistical error, would be hardly measured with traditional spot sampling, but due to the large amount of data from MA-XRF scanning, it can be detected, as shown by the results. The calculated statistical error in the thickness determination is about 0.07 µm (Equation (3)). Therefore, what we observe in the measured thicknesses in both AoI B and C is mostly statistical fluctuation of data. However, the observed mean thickness shift (Table 1), which is less than the standard deviation, is still valid. It is worth noting that the 0.07 µm shift, exactly the same as the statistical error, would be hardly measured with traditional spot sampling, but due to the large amount of data from MA-XRF scanning, it can be detected, as shown by the results.

Conclusions
The measurement of gilding thickness has become a very common practice, and in this paper, the possible advantages of using a MA-XRF scanner for thickness testing have been analysed in more detail. Apart from allowing the detection of inhomogeneities in the sample surface to a limited extent,

Conclusions
The measurement of gilding thickness has become a very common practice, and in this paper, the possible advantages of using a MA-XRF scanner for thickness testing have been analysed in more detail. Apart from allowing the detection of inhomogeneities in the sample surface to a limited extent, avoiding areas that can introduce errors, the MA-XRF dataset provided a larger sample space to enhance the statistical power. The statistical error calculated with the present dataset for estimating a mean gilding thickness is about 0.07 µm (Equation (3)). As shown in Table 1, the observed standard deviation of AoI B is 0.13 µm, which, being the same as the calculated statistical error of thickness determination (Equation (2)), leads to a spread of data due to possible changes in σ 2 samp of 0.11 µm (Equation (4)). Therefore, it is reasonable that the result is coherent with the possible thicknesse variation given by the gold leaf manufacturer.
The present results show how the thickness measurement from a large dataset with a spatial average over a gilded area is possible and has advantages, such as the possibility of detecting the presence of an adhesive nonabsorbing layer used for gilding, with certain limitations. Nonetheless, further studies with different types of mordants are still needed. A careful examination of the histograms (Figure 7) shows that the presence of the resin layer can be inferred from the shift of the average value downwards, but also from the evident modification of the structure of the histogram. The latter fact is supported by the extreme sensitivity that was observed in the MC simulation with the presence of an adhesive resin (shifting the thickness average upwards). Overall, a noninvasive and indirect estimation of gold leaf thickness applied to a homogeneous or inhomogeneous substrate is demonstrated to be possible with the proposed methodology, with some restrictions. In this case study, a titanium dioxide substrate was used and tested. Further studies are required to test the proposed methodology with different substrates, e.g., lead white, extending the method's applicability to older artworks prior to the mass production of titanium dioxide (ca. 1916).