More than XRF Mapping: STEAM (Statistically Tailored Elemental Angle Mapper) a Pioneering Analysis Protocol for Pigment Studies

: Among the possible variants of X-Ray Fluorescence (XRF), applications exploiting scanning Macro-XRF (MA-XRF) are lately widespread as they allow the visualization of the element distribution maintaining a non-destructive approach. The surface is scanned with a focused or collimated X-ray beam of millimeters or less: analyzing the emitted ﬂuorescence radiation, also elements present below the surface contribute to the elemental distribution image obtained, due to the penetrative nature of X-rays. The importance of this method in the investigation of historical paintings is so obvious—as the elemental distribution obtained can reveal hidden sub-surface layers, including changes made by the artist, or restorations, without any damage to the object—that recently speciﬁc international conferences have been held. The present paper summarizes the advantages and limita-tions of using MA-XRF considering it as an imaging technique, in synergy with other hyperspectral methods, or combining it with spot investigations. The most recent applications in the cultural Heritage ﬁeld are taken into account, demonstrating how obtained 2D-XRF maps can be of great help in the diagnostic applied on Cultural Heritage materials. Moreover, a pioneering analysis protocol based on the Spectral Angle Mapper (SAM) algorithm is presented, unifying the MA-XRF standard approach with punctual XRF, exploiting information from the mapped area as a database to extend the comprehension to data outside the scanned region, and working independently from the acquisition set-up. Experimental application on some reference pigment layers and a painting by Giotto are presented as validation of the proposed method. principal energies (i.e., elements’ emission series) emerging from the GS evaluated from the reference panel data. The series has been ordered following the incidence criterion: the first position is occupied by the series, which, if removed, generates a similarity change of more than 10% with respect to the value of [𝐴] 𝑘 0 involving the largest number of pixels; the second place is held by the series which involves the second larger number of pixels and so on. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 5 and specify the series that have been removed before the calculation of the corresponding set of similarity maps.


Introduction
Until about ten years ago, talking about X-Ray Fluorescence (XRF) imaging meant talking about Synchrotron Radiation of advanced generation for tomography and holography [1]. Nowadays, XRF imaging in Cultural Heritage (CH) field immediately recalls XRF mapping (or Macro-XRF, MA-XRF), which is the recording of XRF spectra together with their spatial coordinates, so to allow the reconstruction of distribution maps for chemical elements in the sample. This can be obtained, in principle, by either scanning the sample or using a pinhole and a 2D detector, the so-called full-field XRF (FF-XRF) [2][3][4].
MA-XRF mobile instruments scan samples, as painted artworks, with an X-ray beam whose dimensions can vary from one to several hundred micrometers in diameter. The detected characteristic X-ray fluorescence emission, stimulated by ingoing radiation, allows creating the images of the elemental distribution. Technical details are beyond the purpose of this paper, aiming to discuss the consequences in CH field and the possibilities linked to a good post-processing of data. Indeed, the physical background of MA-XRF does not differ from that of XRF, but the possibility of mapping elemental distribution on samples gives this technique the dignity of a new analytical method and makes it one of the most useful tools to support restoration and conservation interventions. One of the characteristics which makes MA-XRF a routine technique not only on painting or CH materials but also in many other fields (such as geology, biology, forensic [5][6][7][8][9][10]), is the multispectral capabilities and the possibility of visualizing the distribution of chemical elements at and below the surface of paintings, according to the self-absorption limits for X-rays. Indeed, maps are a more intuitive tool that can be easily interpreted by outsiders, such as restorers, art-historians, curators, and conservators.
The first experiments in 2007 were performed with synchrotron radiation [11]. Ten years until then, MA-XRF regularly applied in museums, archeological sites, conservation studios, and the first workshop on MA-XRF, Macro X-ray Fluorescence Scanning in Conservation, Art, and Archaeology was held in Trieste [12].
Nowadays, portable MA-XRF (p-MA-XRF) has moved over, with the possibility of taking into account also the shape of the scanned surface [13,14] and combining its results with all the other well-established imaging techniques [15][16][17][18][19][20][21]. Recent instrumentation organizes data in 3D spectral image cubes (one of the axes is the spectral one, the other two axes describe the position) [22]. Moreover, and this is the focus of our paper, data analysis has been more and more developed and optimized [23][24][25] until the interpretation using neural networks [26].

State of the Art Instruments and Methods
Cultural Heritage artifacts are known to have a high variability: they have different sizes, different shapes, and are made of very different materials. So, as adaptation is the most important characteristic of a living being, the same can be said for modern MA-XRF spectrometers. That is why analytical techniques have shown a high development in their portable versions, without neglecting the quality of the results. Indeed, modern spectrometers are required to analyze all kinds of samples with higher sensitivity, both spatial and analytical, adapting to the characteristic of each single artifact, sometimes also coupling multiple techniques.
The development of MA-XRF scanners has focused mostly on reducing the dwell time and on increasing the spatial resolution, as these two parameters are indeed those that define the measurement time of a surface. The dwell time represents the time required for the analysis of a pixel, while the spatial resolution represents the size of the pixel so that the total measurement time can be described as: where d t is the dwell time, m t is the time needed to move to the next pixel and N is the number of pixels. The higher is the spatial resolution, the higher is the number of pixels needed to cover the same area; the lower is the dwell time, the lower is the time of analysis. To exemplify the high improvements made in the last thirty years, we just need to note that one of the first developed portable instruments had a dwell time of 30 s (plus 25-30 s to move to the next sample point) and a best spatial resolution of 1 mm so that hours were needed to analyze a small portion of a painting [27]. For modern instruments, dwell time is reduced by 1-4 orders of magnitudes, and an improvement of 2 orders of magnitude in spatial resolution is obtained, so that the same areas can be analyzed with a higher resolution in less time. To improve the spatial resolution, capillaries and capillary lens substitute the collimators, ensuring a higher flux. The signal intensity has also been increased using suitable detectors, especially Silicon Drift Detectors (SDDs) [24,[28][29][30]. Optimization of geometrical conditions have also been permitted to reduce the dwell time: minimizing the distance of the detector from the sample, the absorption of air at low energies is reduced, and at the same time, the acceptance solid angle is increased [31]. Furthermore, detectors with a larger detection area (or more than one detector in combination) highly increase the detected signal, speeding the measurement time up. Moreover, the size and the portability of these system allows to analyze samples with different dimensions, from manuscripts to large paintings [32][33][34][35][36], not only in museums or archives but also in archaeological sites [37], extending in this way the advantages of this kind of analysis to all the possible objects of the CH world. Besides, the higher spatial resolution has opened new possibilities for this technique, which allows not only to analyze the composition of the artist palette, or the presence of underdrawings, but that is also capable of recovering degraded and illegible daguerreotypes [38].

State of the Art. Data Handling and Synergic Applications
The data collected through an MA-XRF analysis are a x × y × N matrices, where x × y are the pixels (sample points) collected and N are the channels of the ED-XRF (Energy Dispersive-XRF) spectra. The analysis of each spectrum is not different from the analysis of the same data collected with other XRF methods, i.e., punctual XRF, thus the data treatment of each spectrum can follow the same protocol both for a qualitative and for a quantitative analysis. Yet, we have to face two main problems: the amount of data to be analyzed, and the inhomogeneity of the data itself, that is the variation of the data caused by other parameters than sample composition, as variation in the spectrometer-sample distance, shadowing (of the source and the detectors) due to the sample shape, and changes in the roughness of the surface [39][40][41]. These sources of error must be taken into account to perform a proper data reduction without compromising their correct evaluation.
Some instruments can automatically maintain a constant distance between the spectrometer and the sample: this is particularly important when dealing with large paintings, usually warped, or when analyzing 3D objects, like jewels or other kinds of artifacts [27][28][29]. Indeed, if the distance is allowed to vary, a post-processing of the spectra is required, especially if we need to analyze light elements, highly affected by air absorption. A way to correct the data is proposed by Alfeld et al. [13], exploiting the argon signal, due only to the interaction of X-rays with air and, as a first approximation, proportional to the sampledetector distance. Even if this method has been applied to stitch multiple MA-XRF images of the same paintings, it may also be used to correct small variations in the acquisition distance.
The data correction for the shadowing effect is more complex: when the analyzed spot is partially hidden from the detector due to the morphology of the artifact, the artifact itself causes a reduction of the solid angle of the detector/source, lowering the signal. Some spectrometers mount two detectors in opposite directions [24] that partially mitigate this effect.
If some of these sources of errors can neither be corrected in the post-processing of the spectra, they must be taken into account during the data analysis, with particular attention to the morphology of the sample.
As already said, the amount of data collected in a MA-XRF scanning is a cubic matrix with hundreds of spectra; it is obvious that an operator cannot analyze all the spectra. A data reduction process is thus necessary and can be performed both as a channel data reduction (reducing the matrix along the N axis) or as a sample data reduction (reducing the matrix along the x × y axes).
The channel data reduction is probably the simplest to perform, for instance, converting the spectra into their fitted data, retrieving only the net area of the peaks. This process can be performed through the analysis of the sum spectrum of all the x × y sample points, to evaluate the elements present in the whole scanning to be fitted in the following spectral analysis. The matrix thus obtained can then be treated by simple statistical methods, such as Principal Component Analysis (PCA), probably one of the most used techniques for data reduction, especially thanks to the low data loss that it provides. The N channels can then be represented in a k-dimensional space (where k is lower than N) and grouped into clusters. Different approaches relying on clustering methods can be used for sample data reduction. Most of these methods aim to cluster similar spectra in groups: each group can then be represented by an endmember, which summarizes the characteristics (the chemical composition) of the whole group.
A way to cluster XRF spectra is the use of SAM (Spectra Angle Mapper): in this method, a spectrum is considered as a point in a space of N dimensions, where N is the number of the channels. The difference between two spectra can be evaluated as the angle that divides the vectors heading to the two N-dimensional points: where ρ l and ρ l are the values of the channels of the two spectra to confront. This technique has been widely used for the analysis of multispectral data, but also for XRF data [42,43]. For each group, an endmember can be found, which exemplifies the chemical composition of all the sample points of the same group. Another way to obtain the same results is the use of Artificial Neural Networks (ANNs) [44,45]. Usually, ANNs require training to calculate the weights associated with each neuron, and then the weights can be employed to analyze the dataset. In the work of Kogou et al. [26], the authors use a Self-Organizing Map (SOM) method that skips the training process using the same dataset as a training set, allowing a fully automated clustering.
As an example of the flexibility and of the enormous potential of XRF mapping, we are introducing and discussing a pioneering analysis protocol called STEAM, Statistically Tailored Elemental Angle Mapper. Based on the SAM algorithm and on the Global Spectrum (GS) analysis introduced by Galli and co-workers [46], STEAM first accomplishes the tasks of the MA-XRF typical approach (i.e., it maps the elemental distribution [10,14]) and then, in synergy with punctual XRF, it exploits the information gathered from the mapped area(s) as a database to extend the comprehension to data outside the scanned region(s). The protocol works independently from the acquisition set-up and, once defined the main features of the database, it sheds light on uncharacterized data, disregarding their origin and their relationships with the scanned region(s).

Instrumentation
The experimental data are X-ray fluorescence spectra, collected with two different spectrometers, ELIO by XGLab srl, Bruker Nano Analytics Division, and ARTAX 200 by Bruker. Even if the operative range of both the instruments is wider than 2.5-14.5 keV, the analyzed data were limited to this interval to exclude from the spectra the emission lines of both the X-ray excitation tubes; in fact, spectrometers employ anodes in Rhodium (ELIO) or Molybdenum (ARTAX 200), two elements that present K-and L-series at energies higher than 15 keV and lower than 2.5 keV.

ELIO Spectrometer by XGLab Srl
This spectrometer is based on 25 mm 2 area, Peltier-cooled, Silicon Drift Detector characterized by an energy resolution of 130 eV on the Mn-k α line at 0.5 µs shaping time, a peak-to-background ratio of the order of 15,000, and by silicon thickness of 500 µm. The excitation source is a low power (4 W), 50 kV, transmission X-ray tube with Rh anode, coupled to a 1 mm collimator. The source exploits interchangeable filters and provides a 1.2 mm spatial resolution on the sample at the focusing position. The design of the source and detection system and the large solid angle of X-ray collection are optimized to obtain a high counting-rate capability even if a low power X-ray tube is used. The compact detection head is completed by an integrated microscope camera (magnification ×10, field of view about 8 × 6 mm), an external video-camera, focal and axial lasers for fine positioning, and LEDs light for sample illumination on the analysis region with dimming adjustment. The system can be equipped with an XY translation stage (with 100 mm total travel and 100 µm step size), for 2D mapping. For a typical XRF map (50 × 50 mm of scanned area, 1 mm step, and 1 s acquisition per step) the total measurement time is less than 1 h. Since the excitation scheme does not require poly-capillary optics, the spectrometer is highly sensitive in the full range of 1-40 keV. A tripod with 3D orientation makes the instrument portable and compatible with almost any measurement geometry (horizontal, vertical, tilted). Mapping measurements have been performed on the gable "God the Father with Angels" by Giotto, employing a tube voltage of 50 kV, a tube anode current of 80 µA, and an acquisition d-well time of 1 s for each point. The total XRF map, 60 × 30 mm with a lateral step of 1 × 1 mm, has been recorded in about 50 min. The isolated XRF singlepoint spectra have been collected with slightly different acquisition parameters: acquisition time of 120 s, tube voltage between 20 and 50 kV, tube anode current between 40 and 200 µA depending on the point.

ARTAX 200 Spectrometer by Bruker
Bruker portable EDXRF spectrometer is equipped with an X-ray tube (Mo anode) with a beam collimated at 0.65 mm in diameter corresponding to an excited sample area of 0.33 mm 2 . The characteristic X-ray radiation emitted by the sample is passed to a semiconductor detector, which works according to the drift chamber principle (SDD). The idea of optical triangulation is applied for the adjustment of the working distance between the sample and the measuring head. The excitation beam and the optical axis of the detector meet at the measuring point when the laser spot matches cross hairs reported on the service CCD camera of the system; this procedure guarantees the reproducibility of the experimental conditions. The system presents an exchangeable filter slide with three positions and its sensitivity ranges from 2 to 40 keV. In this study, the Mo filter (12.5 µm thick) has been used, the tube voltage and the anode current of the tube have been fixed, respectively, to 40 kV and 800 µA, the acquisition time was 60 s while the acquisition window was 1-25 keV.

Data Handling and Samples
The idea behind the design of STEAM is to extend the information contained in a well-characterized area(s) of the sample outside its edge. In this perspective, it requires the region's data to be referred to as a starting point (i.e., a database) for investigating new spectra and the portions of the surface they belong to. Therefore, before the application of the protocol to uncharacterized works of art, the capabilities of STEAM were checked on an ad-hoc prepared sample.

The MA-XRF Database
The database is constituted by 1800 spectra mapped over a 60 × 30 mm area (yellow rectangle and zooms in Figure 1) of the surface of the gable of San Diego by the spectrometer ELIO.
This choice finds its rationale in the fact that the features of the database must constitute the starting point for STEAM, and therefore they must be well characterized. The area in Figure 1 has been exhaustively described by Galli and co-workers [46]; therefore, its main features can be considered as known. For what concerns the application of our protocol, the main results of the quoted paper can be summarized as follow: the results referring to the left half of the scanned area mainly compliant with the technique used by Giotto in the Croce of Santa Maria Novella, a double layer providing a Cinnabar-White Lead mixture (elementally dominated by the couple Pb-Hg) superimposed to a gypsum-Verdaccio lower layer (Ca-Sr and Fe-K couples) [47]. On the contrary, the right half reveals heavy restorations characterized by the presence of Ti and Cr; nothing can be said about the stratigraphy within the restoration areas other than the original layers have been lost or, at best, altered. The greenish tone of the infra-red false-color image (right zoom in Figure 1) highlights the original work by Giotto from the principal retouches which, for clarity, have been segmented and surrounded by red profiles. Table 1 summarizes the ad-hoc layer sequences used to test the capabilities of STEAM. All of them were made with pure red pigments spread in egg tempera or oil on a panel board prepared with White Lead over gypsum. The mockup paintings, drawn in separate areas, are made of a few layers combined in different ways to verify if the method was able to discern within similar, but different, cases. Pigment choice has been based on the palette used by Giotto for the flesh tones of the gable of San Diego [15,46]. In order to account for the irregular thickness of the painted panel, three XRF spectra have been acquired by Bruker Artax 200 spectrometer for each layers' sequence and the average spectra have been used to test the performance of the protocol.

The Reference Panel
or, at best, altered. The greenish tone of the infra-red false-color image ure 1) highlights the original work by Giotto from the principal retouc ity, have been segmented and surrounded by red profiles. Table 1 summarizes the ad-hoc layer sequences used to test STEAM. All of them were made with pure red pigments spread in egg a panel board prepared with White Lead over gypsum. The mockup p separate areas, are made of a few layers combined in different ways to v was able to discern within similar, but different, cases. Pigment choice the palette used by Giotto for the flesh tones of the gable of San Diego account for the irregular thickness of the painted panel, three XRF spe quired by Bruker Artax 200 spectrometer for each layers' sequence and tra have been used to test the performance of the protocol.   Table 2. The Right Zoom shows the infrared false-color image of the scan: the greenish tone reveals the original layers while the red profiles outline the principal zones affected by restorations.

Punctual XRF Test Set
Twenty-three isolated XRF spectra have been collected by ELIO on the gable of San Diego, inside and outside the area considered for MA-XRF scanning, as detailed later. The location of the acquisition points ( Figure 2 and left zoom in Figure 1) has been chosen by art historians on the basis of the available documentation about the conservation history of the painting.

Punctual XRF Test Set
Twenty-three isolated XRF spectra have been collected by ELIO on the gable of S Diego, inside and outside the area considered for MA-XRF scanning, as detailed later. T location of the acquisition points ( Figure 2 and left zoom in Figure 1) has been chosen art historians on the basis of the available documentation about the conservation histo of the painting.  Table 2.
The choice of these points follows the twofold purpose to verify hypotheses fro previous studies [15,46,48] and, if possible, to gather new insights into the gable's featur Since the right part was supposed to be more affected by restorations with respect to left one, the same tones have been collected on both groups of angels to compare the us pigments. Moreover, the book held by God has been investigated because the authentic of the letters typed on the pages is still debated. The details of the points where the spec have been detected are listed in Table 2 and can be visualized in Figures 1 and 2. Poi from 20 to 23 have been collected within the scanned region to guarantee a connecti between the punctual and mapping XRF acquisition in this validation phase. The choice of these points follows the twofold purpose to verify hypotheses from previous studies [15,46,48] and, if possible, to gather new insights into the gable's features. Since the right part was supposed to be more affected by restorations with respect to the left one, the same tones have been collected on both groups of angels to compare the used pigments. Moreover, the book held by God has been investigated because the authenticity of the letters typed on the pages is still debated. The details of the points where the spectra have been detected are listed in Table 2 and can be visualized in Figures 1 and 2. Points from 20 to 23 have been collected within the scanned region to guarantee a connection between the punctual and mapping XRF acquisition in this validation phase. Table 2. Points of the gable of San Diego where the punctual XRF spectra have been collected. The numbers between the parentheses refer to Figure 1 (from 20 to 23) and Figure 2 (1 to 19).

Right Angels
Green dress (1) Right Angels Blue dress (2) Right Angels Face of the green dressed (3) Right Angels Hair of the green dressed (4) Right Angels Halo of the green dressed (5) Right Angels Sleeve of the green dressed (6) Right Angels Red dress (7) Right Angels Hair of the blue dressed (8) Left Angels Green dress (9) Left Angels Blue dress (10) Left Angels Sleeve of the bleu dressed (11) Left Angels Red dress (12) Left Angels Face of the red dressed (13) Book Black Ink (14) Book White of the pages (15) Book Red ink (16) God the Father Yellow dress (17) God the Father Blue hat I (18) God the Father Blue hat II (19) God the Father Pupil (20) God the father Iris (21) God the Father Sclera (22) God the Father Face (23)

The STEAM Protocol
An X-ray fluorescence spectrum reflects the elemental composition of the materials used in the painting in the volume around the acquisition point [49]. Organizing the acquired spectra into maps (XRF mapping) [15,46], thus, allows to retrieve the spatial distribution of the elements. Global Spectrum (GS) [15] can be a statistical tool for the analysis of the scanned area(s), as it highlights the statistical weight of each element in the dataset. It allows to evaluate how frequently a particular element is found in a group of spectra: the intensity of a channel of the GS represents how many times that channel brings information within the spectra, so how many times a particular fluorescence signal is detected in the dataset. All these inputs not only provide an exhaustive description of the original and restored regions (including the used pigments) of a work of art but, when supported by appropriate statistical tools, also permit inferences of the stratigraphy of the mapped area(s) [17,46,50,51]. Unluckily, the achieved knowledge remains confined within the edge of the scan(s) and no significant conclusions can be deduced regarding data from outside the mapped area(s). Applying our STEAM protocol, the evidence retrieved from the scanned area(s) create the database, which can be employed to characterize the spectra outside the mapped region(s), even belonging to a different sample. Thus, the XRF study of the objects of interest can be initially performed without the need for a complete scan of the sample(s)' surface; indeed, the MA-XRF can be planned in a second time and tailored on the base of the results of STEAM on the single points spectra.
STEAM protocol was developed exploiting Matlab programming (MATLAB and Statistic Toolbox Release 2019b, The MathWorks, Inc., Natick, MA, USA) with the aim of becoming an automatic process useful also to non-expert users.

STEAM vs. SAMs
As evident by the acronym, STEAM is inspired by SAM [43]. As mappers, the protocol processes X-ray spectra as N-dimensional vectors, where N is the number of acquisition channels of the spectrometer and assesses the similarity between a specific spectrum, ρ k , and the ρ (i,j) spectra belonging to the mapped region(s) by calculating the angle α (i,j) k between the spectra, that, accordingly to Equation (2), is: where: and are the lengths of the vectors, and ρ k l , ρ (i,j) l , are the counts at the l-th channel of the spectrometer (i.e., the l-th coordinate of the vectors). In SAMs, L ρ k refers to the length of the k-th endmember where k is an integer between one and the number of identified endmembers; i.e., the idealized members of the elements' classes recognized within the data [52]. The task of SAMs is to reformulate the ρ (i,j) as linear combinations of ρ k with coefficients dependent on the angles α (i,j) k . When mapping refers to paintings, the set of ρ k is a pool of independent spectra identified by the user as the best descriptors of the investigated palette [53], while the ρ (i,j) are MA-XRF acquisition organized into a 3D spatial-energy matrix. Therefore, every endmember corresponds to a so-called similarity map [A] k , an image that describes the spatial affinity of the k-th endmember with the spectra within the scanned region(s) [54]. The lower is the angle α (i,j) k the higher is the brightness of the image (i.e., of the matrix element α (i,j) k in [A] k ) and the higher is the similarity of the k-th endmember with that point of the scan. Since the endmembers are independent of each other, the [A] k identifies the map distribution of the pigments chosen as k-th endmembers for the dataset.
STEAM still evaluates angles between vectors in N dimensions, but it does not refer to endmembers; ρ k are the spectra of k uncharacterized isolated points that can be equally acquired within the mapped zone, into another area of the same sample or, even, derived from other object(s) of interest. In this case, every [A] k still shows which portion(s) of the scan best matches the features of the associated ρ k , but since the isolated spectra are not necessarily independent of each other, an exhaustive description of the ρ (i,j) in terms of ρ k or vice versa is not feasible. Indeed, the most intense channel shared with the kth spectrum dominates every element of the matrices [A] k : elements that are abundant and present in the whole map quite never correspond to the most enlightening ones; in fact, the peculiar chemical element for a pigment (hereafter referred as the "signature") of an artwork is often a minor component in the mixture that constitutes the applied layer(s). The small, but significant coordinates, ρ k l , bound to the signature, risks to be underrated or darkened by the higher ones. As an example, in the case of various colored pigments in a mixture with a high quantity of the same white pigment, the small quantity of chromophore pigment would be hidden from the high signal identifying the white used. The absence of endmembers seems to be a pitfall of STEAM; however, the developed protocol compensates for the lack of independent endmembers employing an innovative use of the statistical features describing the XRF spectra and summarized by the GS. Here, the role of ρ k and ρ (i,j) is switched as the map itself describes the isolated points, thus no effort for the search of descriptors should be done and the database potentially works for an unlimited number of datasets.

STEAM and GS
In the GS, the intensity of each fluorescence peak represents the frequency of observation of that peak within the dataset [15]. However, the global spectrum does not merely highlight the q main fluorescence lines within the dataset (where q ranges between 0 and the number of series gathered by the GS): it is easy to build a hierarchy within the GS, based on the rational hypothesis that the channels characterized by the highest counts will be barely meaningful for classification purposes since a high intensity within the GS means that the corresponding fluorescence line has been detected in quite all the spectra. Therefore, the related element will result useless for inferring the significant features of the regions surrounding the isolated points (i.e., these elements do not belong to the signature).
The Statistically Tailored Elemental Angle Mapper translates the statistical abundance into a criterion for manipulating the spectra before the evaluation of α (i,j) k : the components ρ k l and ρ (i,j) l (corresponding to the ranked channels) are sequentially deleted, starting from the most recurrent, in this way the role of the low rated components is emphasized. Thus, every ρ k is associated with a set of q similarity maps, [A] k q . The value of q represents both the place hold by the fluorescence line within the ranking and the order of deletion (q = 0 means that no channel has been removed). The abundance has been assumed as the first ranking mode, indeed it is the more direct statistical parameter a ranking criterion can be based on. In fact, the deleting order depends on the counts in the GS and the rationale is straightforward to understand: a fluorescence peak detected in almost all the spectra cannot be effective for discerning between similar spectra and should be removed as first. Besides the abundance, STEAM can be tuned on a second-ranking mode defined as the incidence criterion: the fluorescence peaks have been ordered on the basis of how much their removal would affect the similarity distributions. The method compares the differences between [A] k 0 , the set of similarity maps obtained by the original spectra, and the possible q [A] k 1 , the sets of similarity maps obtained after that one of the q detected fluorescence peaks have been removed from the original spectra. Then, the brightness change (corresponding to a similarity change in STEAM) of the maps is evaluated as the number of pixels undergoing a brightness change bigger than the 10%. The fluorescence peak that corresponds to the maximum brightness change is ranked as the first of the removal list, the second place is assigned to the series that records the second biggest numbers of matrix elements that present a brightness change of 10% of their original value and so on. The rationale of the incidence criterion relies on the fact that the bigger is the number of scanned area's points affected, the lesser is the distinguishing power of a fluorescence peak.
Note that no new concepts need to be invoked for understanding STEAM. Every [A] k q remains a set of similarity maps obtained evaluating the angle between couples of vectors, the only difference within the [A] k q relies on the fact that the length of the vectors used for the evaluation of the α (i,j) kq decreases at the increasing of q, due to the removal of a fluorescence peak at each step. A critical observation of the resulting sets of similarity maps potentially enables the users to exploit the database for inferring a description of the new data points and their local surrounding regions; the only sure exception is constituted by those isolated acquisitions situated at the dividing lines between two distinct areas of the sample (e.g., the border between two shades of paint); in this case, the description of the nearby region has to be considered as partial. Figure 3 shows a diagram that resumes as STEAM works.
x FOR PEER REVIEW 11 of 23

Characterization of the Reference Panel
The capabilities of STEAM have been tested by applying the protocol to a panel containing a set of samples whose characteristics were known (see Table 1). Table 3 reports the series emerging from the GS obtained from the spectra of the reference panel and ranked following the abundance criterion. The list establishes the order of removal for the series (ranking equal to zero, q = 0, means that no channels have been deleted from the spectra before the evaluation of the corresponding set of similarity maps, [ ] 0 ).

Characterization of the Reference Panel
The capabilities of STEAM have been tested by applying the protocol to a panel containing a set of samples whose characteristics were known (see Table 1). Table 3 reports the series emerging from the GS obtained from the spectra of the reference panel and ranked following the abundance criterion. The list establishes the order of removal for the series (ranking equal to zero, q = 0, means that no channels have been deleted from the spectra before the evaluation of the corresponding set of similarity maps, [A] k 0 ). Table 3. The principal energies (i.e., elements' emission series) emerging from the GS relating to the reference panel data. The series has been ordered following their abundance from the most to the less detected. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 4 and specify the series that have been removed before the calculation of the corresponding set of similarity maps.

Panel
The first places of the ranking are a prerogative of the series of the Pb and this is straightforward: Lead should appear in nearly all the analyzed spectra since the pigments' sequences have been spread on a panel prepared with a layer of White Lead over gypsum. On the other hand, the peaks related to the X-ray lines of elements such as Hg (L α at 10.0 and L β at 11.8 keV) or Fe (K α at 6.4 keV), which characterize, respectively, cinnabar and the couple hematite/red ochre (red ochre is a clay colored by a variable amount of hematite), come toward the end of the list because their contributions have been detected in a limited number of sequences. Figure 4 shows the sets of similarity maps, [A] k q , resulting from the comparison between the spectra of the database (the Giotto's gable) and those collected on the reference panel. Figure 4A shows the results obtained without manipulating the spectra. It is possible to observe the presence of different groups of similarity distributions within [A] k 0 , but any partition is easily ascribable to the features reported in Table 1. Being hematite/red ochre and red lake pigments with very different composition, the sequences they belong should be distinguishable, but this does not arise from [A] k 0 even if hematite/red ochre is characterized by Fe while red lake does not contain elements detectable by either the spectrometers. Cinnabar-based sequences cannot be clearly recognized too; even if Hg should be a distinctive element, from Figure 4 it is quite difficult to suppose a significant difference between the sequences 15 (Cinnabar) and 5 (Carmine/Red Lake) or argue that 15 and 10 both contain Cinnabar (Hg). The fact that Hg and Fe do not constitute a peculiar feature is not due to the low sensibility of the instruments, otherwise, these elements would not be noticed within the global spectrum; it could be that the counts for the peaks at 6.4 (K α emission of Fe), 10, and 11.8 keV (respectively, L α and L β emissions of Hg) are too low for making iron or mercury a distinctive characteristic of the related spectra. Essentially, Hg and Fe cannot be a real signature because mercury and iron's X-ray main series have low counts in comparison with Lead which, in turn, dominates and flattens the [A] k 0 similarity maps as foregone since the panel has been prepared with White Lead. Figure 4B shows what happens not considering the 10.5 and 12.6 keV peaks (respectively, L α and L β emissions of Pb) in the data. Three principal groups appear and strikingly they fit the description of Table 1 quite at all: 2, 10, 13, 15, 16, 18, and 19 reflect the presence of cinnabar; 3, 11, 12, 14, and 17 individuate the hematite/red ochre group, while 1, 5, 6, 9, and 20 correspond to Red Lake. The remaining sequences, 4, 7, and 8, deserve further discussion. Sequence 4 is Red Ochre over White Lead, therefore, it should be characterized by Fe and resemble the similarity distribution of the Hematite/Red Ochre group. Probably, the intensity of K α of Fe for sample 4 is particularly weak in comparison with the intensity of Pb's lines even if the principal lines in Pb L series have been already removed. This hypothesis finds a double confirmation in Figure 4C, obtained by deleting the 9.2 keV peak, Pb L l line: firstly, the similarity distribution of sequence 4 approaches that of 3 and, in addition, the removal of 9.2 keV line also affects 11, 14, and 17, which contain red ochre too. It must be noticed that, after deleting the 3rd series of the ranking, a slight change can be observed for all the multi-layers as could be expected for a peak belonging to Pb. Even if [A] k 3 do not suggest relations between sequences 7 and 8 (both containing Red Ochre; 7 below, 8 above Cinnabar) and the Hematite/Red Ochre group, the similarity maps of Figure 4C can be definitively grouped into 3 sets related, respectively, to Red Lake, Cinnabar and to the couple Hematite/Red Ochre. Once Iron has been eliminated ([A] k 6 , Figure 4D) Hematite/Red Ochre's group vanishes since it loses its peculiarity. The Red Lake set behaves in the same way probably because of the absence of Fe, a condition which marks this group and that, without the channels referred to Iron, stops to be significant. Summarizing, STEAM discerns three principal sets within the sequences of the reference panel dominated, respectively, by Hg, Fe, and the absence of Fe. Moreover, kept out the comments about 7 and 8, every consideration about the sequences of these samples' results is reliable also with any a priori knowledge of the reference panel' layers. The behavior of 7 and 8 is probably due to the shading action of Hg over Fe; thesis which finds prompt confirmation by manually switching the removal order for Iron and Mercury. If the 10 keV L α and the 11.8 keV L β of Hg are removed before the 6.4 keV K α of Fe ([A] k 6 * , Figure 4E) the Cinnabar group vanishes, 7 and 8 reveal the presence of Fe, and their similarity maps can be associated with the Hematite/Red Ochre's group. Simultaneously, 2, 10, 13, 15, 16, 18, and 19 lose their signature and assimilate to the Red Lake's group consistently with the fact that Cinnabar itself does not contain Iron.
Appl. Sci. 2021, 11, x FOR PEER REVIEW 12 of 23 Table 3. The principal energies (i.e., elements' emission series) emerging from the GS relating to the reference panel data. The series has been ordered following their abundance from the most to the less detected. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 4 and specify the series that have been removed before the calculation of the corresponding set of similarity maps. The first places of the ranking are a prerogative of the series of the Pb and this is straightforward: Lead should appear in nearly all the analyzed spectra since the pigments' sequences have been spread on a panel prepared with a layer of White Lead over gypsum. On the other hand, the peaks related to the X-ray lines of elements such as Hg (Lα at 10.0 and Lβ at 11.8 keV) or Fe (Kα at 6.4 keV), which characterize, respectively, cinnabar and the couple hematite/red ochre (red ochre is a clay colored by a variable amount of hematite), come toward the end of the list because their contributions have been detected in a limited number of sequences.  Figure 4 shows the sets of similarity maps, [ ] , resulting from the comparison between the spectra of the database (the Giotto's gable) and those collected on the reference panel. Figure 4A shows the results obtained without manipulating the spectra. It is possible to observe the presence of different groups of similarity distributions within [ ] 0 , but any partition is easily ascribable to the features reported in Table 1. Being hematite/red ochre and red lake pigments with very different composition, the sequences they belong should be distinguishable, but this does not arise from [ ] 0 even if hematite/red ochre The same conclusions can be inferred by changing the STEAM's ranking criterion from abundance to incidence. Figure 5 shows what happens using as ranking's rationale the number of pixels involved by a significant similarity change (greater than the 10% in terms of image brightness) after the removal of one of the detected X-ray series. Again, the first positions of the ranking reflect the omnipresence of Lead while the signature elements, Hg and Fe, come later in the list (Table 4). Following the removal order reported in Table 4, it is straightforward that Figure 5B,C, that refers to the similarity maps' sets [A] k 2 and [A] k 4 , uncover the shading effect of Mercury over Iron with any ad-hoc manipulation of the ranking. Figure 5B confirms the splitting of the sequences into the Red Lake, Cinnabar, and Hematite/Red Ochre groups. Figure 5C unveils the presence of Iron simultaneously with Mercury for sequences 7 and 8. Analogously to the previous discussion, the Cinnabar's sequences do not contain Fe and, therefore, assimilate to Red Lake because of the lack of Fe. Since it is the most intuitive and the easiest to be implemented, the abundance criterion remains the first option for listing the removal order, but the discussion about sequences 7 and 8 proves the importance of exploiting both the available ranking criteria.

Panel
Appl. Sci. 2021, 11, x FOR PEER REVIEW 14 of 23 Figure 5B confirms the splitting of the sequences into the Red Lake, Cinnabar, and Hematite/Red Ochre groups. Figure 5C unveils the presence of Iron simultaneously with Mercury for sequences 7 and 8. Analogously to the previous discussion, the Cinnabar's sequences do not contain Fe and, therefore, assimilate to Red Lake because of the lack of Fe. Since it is the most intuitive and the easiest to be implemented, the abundance criterion remains the first option for listing the removal order, but the discussion about sequences 7 and 8 proves the importance of exploiting both the available ranking criteria.  Table 4. The principal energies (i.e., elements' emission series) emerging from the GS evaluated from the reference panel data. The series has been ordered following the incidence criterion: the first position is occupied by the series, which, if removed, generates a similarity change of more than 10% with respect to the value of [ ] 0 involving the largest number of pixels; the second place is held by the series which involves the second larger number of pixels and so on. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 5 and specify the series that have been removed before the calculation of the corresponding set of similarity maps.

Characterization of the Punctual XRF Test Set from the Gable "God the Father with Angels"
Once the effectiveness of both the STEAM's ranking criteria has been demonstrated, the protocol has been applied to the case study of the isolated spectra of Giotto's gable "God the Father with Angels". In Table 5, the series has been listed following the abundance criterion and, therefore, they are ordered from the most to the less detected. Spectra from 20 to 23 have been chosen within the scanned area (see Figure 1) following a twofold rationale: on one hand, they should assure a link between the database and the isolated points; on the other, they should work as internal references for discussing the application of the statistically tailored elemental angle mapper.  Table 4. The principal energies (i.e., elements' emission series) emerging from the GS evaluated from the reference panel data. The series has been ordered following the incidence criterion: the first position is occupied by the series, which, if removed, generates a similarity change of more than 10% with respect to the value of [A] k 0 involving the largest number of pixels; the second place is held by the series which involves the second larger number of pixels and so on. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 5 and specify the series that have been removed before the calculation of the corresponding set of similarity maps. Energy (keV) 10.5 12.6 11.8 10 6.4 9.2 11.3 13.8 8.8

Characterization of the Punctual XRF Test Set from the Gable "God the Father with Angels"
Once the effectiveness of both the STEAM's ranking criteria has been demonstrated, the protocol has been applied to the case study of the isolated spectra of Giotto's gable "God the Father with Angels". In Table 5, the series has been listed following the abundance criterion and, therefore, they are ordered from the most to the less detected. Spectra from 20 to 23 have been chosen within the scanned area (see Figure 1) following a twofold rationale: on one hand, they should assure a link between the database and the isolated points; on the other, they should work as internal references for discussing the application of the statistically tailored elemental angle mapper. Table 5. The principal energies (elements' emission series) emerging from the GS are evaluated from the isolated spectra. The series has been ordered following their abundance from the most to the less detected. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 6 and specify the series that has been removed before the calculation of the corresponding set of similarity maps.

X-ray transition
The first positions of the ranking reflect the elements indicated by Galli and co-workers as the main components of the two layers used by Giotto: Pb (L α at 10.5 keV), Ca (3.7 and 4 keV refer, respectively, to the k α and the K β of Ca) and Sr (K α at 14.1 keV) [15,46]. The X-ray lines of Fe, Hg, and Ti do not compare in all the spectra and, analogously to the case of the reference panel (Table 3), they occupy lower places in the list of Table 5. Despite the stratigraphy below the isolated spectra is not available, STEAM is still able to exploit the database for unveiling significant features of the local areas the points belong. Figure 6A depicts the similarity maps calculated without manipulating the spectra. Some differences can be easily observed, but it is quite difficult to classify the spectra referring to the appearance of the painting (see Table 2): neither the tones nor the locations or whatever self-evidence could drive the user toward a reliable data assignment. Once the peak at 10.5 keV (L α of Pb) has been deleted ( Figure 6B), no sensational improvements can be observed, but some maps show little uneven regions (purple arrows in Figure 6), not noticeable in the [A] k 0 set, which will become important hereafter.
[A] k 4 ( Figure 6C) are the key turn for the analysis of this group of isolated points; the 4th set of similarity maps shows how the scenario promptly clears up after the removal of Ca peaks at 3.7 (K α ) and 4 keV (K β ) and Sr peak at 14.1 keV (K α ). The couple Ca-Sr and Pb are probably the main components of the preparation layers and, once they have been deleted, the elements that define the tones of the pigments remain. Figure 6C suggests the first classification by means of the database's features graphically resumed in Figure 1. For clarity, it should be reminded that the red edged areas in Figure 1 have been obtained segmenting the average projection of the normalized elemental maps of Ti and Cr and, therefore, these regions refer to recent intervention(s) [15]. Since they show very low or even no similarity with the areas ascribed to the original palette, some spectra within the isolated points can be assigned to restoration event(s), such as numbers 2, corresponding to the blue dress of the angel at the right side, and 19, from the blue hat. Other points are consistent with the regions assigned to Giotto's work and can be considered as part of the original project of the master (points 10, 11, or 20, for instance). At this step of data elaboration, nothing can still be said about a few points: 5 and 7 seem to depict an impossible mix of original and modern pigments while, if on one hand 12 and 16 can be excluded from restorations, on the other hand, their similarity with the original areas is so low that any kind of assignment would be a hazard. Following the removal of the K α line of Fe (6.4 keV, Figure 6D), the distinction between original and restoration areas results improved: 1, 2, 3, 4, 6, 8, 9, and 19 can be assigned to recent intervention(s) while 10,11,13,14,15,17,18,20,21,22, and 23 to the Giotto's palette. 12 and 16 are probably two different kinds of reds ascribable to the Florentine master, but their characterization cannot be fully accomplished using the available database. The remaining red tone, 7, gives up some doubts about its collocation within the original pigments and, finally, nothing can still be inferred about point 5. After the removal of the 12.6 keV peak (L β of Pb, Figure 6E), deductions from Figure 6D are confirmed and a further classification within the supposed original spectra is suggested. Areas around points 20 and 21 are characterized by Fe. Spectra 13,14,15,22,23 and their surrounding area can be exhaustively described in terms of the pigments identified by Galli and co-workers [15,46]: 13 and 23 as flash tones; 15, 22, and 14 in terms of the preparation layers because whites have no hues and the lines related to the black ink emissions are not detectable in the used energy range. The classification of 10, 11, 17, and 18 cannot go beyond their assignment to the original palette because blue or yellow hues do not appear in the database used. The low similarity for the maps of 12 and 16 suggests that both the mixtures used for these reds would employ the same materials used within the mapped region but mixed with different proportions. The removal of K α line of Ti (4.5 keV) finally defines the classification of the isolated spectra ( Figure 6F): the similarity within the maps of the points ascribed to the original palette increases in the same areas where it decreases for points assigned to restoration (red arrows in Figure 6) making this behavior a discriminant factor between Giotto and modern pigments. Even if the removal of the Ti series at 4.5 keV affects all the spectra, particularly eye catching is the behavior of some points, namely 2, 19, and 8. The first two completely lose the connection with the database confirming that neither restoration pigments can be fully characterized by this database alone. The similarity distribution of the latter is of great significance for spectra classification: it not only supports the need for expanding the database to get a full description of the pigments, but it also suggests the assignation of 7 to restoration because [A] 7 7 similarity map for point 7 resembles quite faithfully the features of the map related to 8, [A] 7 8 . The deletion of L α of Hg ( Figure 6G) makes the original reds 12 and 16 lose their signature and become very similar to flash tones, vanishing one of the subsets identified by Figure 6D. Figure 6H follows the removal of the K β line of Fe and, as by now expectable, the original spectra reduce into a single set while 7 can be finally associated with restoration(s). The definitive removal of Ti ( Figure 6I) reveals another interesting aspect regarding the restoration areas. Modern pigments could be different even if they have been used to correct the same tone: 9 is not the same as 1 and 6 even if they have been employed to retouch the green dresses of the Angels. This suggests the presence of restorations made in different periods or performed by more than one restorer. Besides the classification of the data, STEAM promotes the discussion about the stratigraphy of the gable; in fact, the comparison between Figure 6A-C,E explains the small areas spotted by the purple arrows in Figure 6. The removal of the Pb L α at 10.5 keV unveils the presence of uneven little areas in Figure 6B where the region was homogeneous in Figure 6A. Once removed, the K α and the K β of Calcium and the K α of the Sr, the same regions disappear ( Figure 6C) for being back after the removal of the L β of Pb ( Figure 6E). It seems quite evident that the contributions of Pb hide the couple Ca-Sr supporting the idea of a two-layers stratigraphy for the scanned zone, where the first containing Pb lies over the Ca-Sr-based one as argued by Galli and co-workers [46]. Switching from the abundance to the incidence criterion (see Table 6 for the list of the series), it is possible to support and extend the observation about the isolated point's dataset. Table 6. The principal energies (elements' emission series) emerging from the GS evaluated from the isolated spectra. The series has been ordered following the incidence criterion: the first position is occupied by the series, which, if removed, generates a similarity change of more than 10% with respect to the value of [A] k 0 involving the largest number of pixels; the second place is held by the series, which involves the second largest number of pixels and so on. The energy of the emission has been reported in keV and classified according to the X-ray nomenclature. The letters refer to Figure 7 and specify the series that have been removed before the calculation of the corresponding set of similarity maps.

Panel
ers as the main components of the two layers used by Giotto: Pb (Lα at 10.5 keV), Ca ( and 4 keV refer, respectively, to the kα and the Kβ of Ca) and Sr (Kα at 14.1 keV) [15,4 The X-ray lines of Fe, Hg, and Ti do not compare in all the spectra and, analogously to case of the reference panel (Table 3), they occupy lower places in the list of Table 5. Desp the stratigraphy below the isolated spectra is not available, STEAM is still able to expl the database for unveiling significant features of the local areas the points belong. Figure 6. The sets of similarity maps, [ ] , for the isolated test spectra of the Gable of San Diego obtained following the abundance criterion. The numbers within the panels refer to Table 2, the letters to Table 5 Figure 6A depicts the similarity maps calculated without manipulating the spect Some differences can be easily observed, but it is quite difficult to classify the spectra ferring to the appearance of the painting (see Table 2): neither the tones nor the locatio 0°9 0°F igure 6. The sets of similarity maps, [A] k q , for the isolated test spectra of the Gable of San Diego obtained following the abundance criterion. The numbers within the panels refer to Table 2, the letters to Table 5 Figure 7B promptly confirms the assignment of sequence 12 and 16 to the original palette of Giotto even if the mixtures used for these reds instantly appear different from the one in the scanned area. The sequential removal of Pb, Ca, and Sr recognizes red 7 as part of the restoration(s) ( Figure 7C) basing on the observation of the areas identified by the red arrows (confirming what is inferred discussing Figure 6). [A] k 7 ( Figure 7D) marks the suppression of all the low energy contributions (minor or equal to 3.3 keV corresponding to the K α emission of K) and allows to classify the couples formed by 11 and 18 and by 20 and 21, respectively, as original blues and blacks. The scenario for points 13,14,15,17,22, and 23 is only apparently more complex with respect to the situation depicted by the abundance criterion; once removed the Fe K α series at 6.4 keV ( Figure 7E), what we inferred observing the panels of Figure 6 can be proposed again. The agreement between abundance and incidence criterion is broken only by sequences 5 and 10 which assignment as unclassifiable and original switches, respectively, to original and restorations. The uncertainty about the nature of these two isolated points stresses once again the need for a larger database for achieving a full description for all the isolated spectra. Besides the data's assignment, the incidence criterion also confirms the mutual relationship between Pb and the couple Ca-Sr: the purple arrows in Figure 7 again highlights how the removal of Pb ( Figure 7B) unveils the presence of an underlying layer basically constituted by Ca-Sr and linked to Fe detection ( Figure 7C-E).
uncertainty about the nature of these two isolated points stresses once again the need for a larger database for achieving a full description for all the isolated spectra. Besides the data's assignment, the incidence criterion also confirms the mutual relationship between Pb and the couple Ca-Sr: the purple arrows in Figure 7 again highlights how the remova of Pb (Figure7B) unveils the presence of an underlying layer basically constituted by Ca-Sr and linked to Fe detection ( Figure 7C-E). Figure 7. The sets of similarity maps, [ ] , for the isolated test spectra of the Gable of San Diego obtained following the incidence criterion. The numbers within the panels refer to Table 2, the letters to Table 6. The color bar illustrates the level of similarity (in terms of the angle between vectors). (A) shows [ ] 0 , the set of similarity maps obtained without manipulating the spectra. (B) shows [ ] 2 , obtained after that the channels around 12.6 and 10.5 keV have been suppressed. (C) Figure 7. The sets of similarity maps, [A] k q , for the isolated test spectra of the Gable of San Diego obtained following the incidence criterion. The numbers within the panels refer to Table 2, the letters to Table 6 Excluding points number 5 and 10, the STEAM splits the isolated spectra dataset into two main groups: restoration(s) and original pigments which can be further divided into subsets depending on how their features match those of the database. The method solves, at least partially, ambiguous assignments, such as those of 7, 12, or 16, and, finally, it is a useful support in the determination of the stratigraphy. The removal rankings must be intended as deduced starting from the GSs of the datasets to be studied, but nothing forbids to reformulate the removal lists employing the database's GS or, even, the global spectrum obtained by the combination of both the GSs; obviously, if combined, the two global spectra have to be normalized to the number of spectra they have been calculated from, otherwise abundance criterion cannot be considered significant.

Discussion
The application of STEAM to the reference panel widely tested the capabilities of the protocol for recovering the main features of the sequences. Starting from an unclear situation ( Figures 4A and 5A) the protocol gradually reaches a description of the reference panel coherent with Table 1 ( Figure 4C or Figure 5B). The partial lack of information regarding the role of Fe in sequences 7 and 8 can be overcome by exploiting the intriguing observation that the K α of Fe, the L β of Hg, and the L α of Hg are ranked one after the other. This evidence suggests changing the removal order of Table 3 and, indeed, the switching of Fe with Hg promptly unveils the presence of Red Ochre in sequences 7 and 8 ( Figure 4D,E), allowing the user to associate them to the Hematite/Red Ochre group too. If a manual change driven by a practical observation can be charged to be a discretional choice to the operator, changing the STEAM ranking mode to the incidence criterion returns a removal order (Table 4), which not only confirms the conclusions provided by the abundance criterion ( Figure 5B) but also automatically elicits the similarity distribution of Fe within 7 and 8 ( Figure 5C). Since there is nothing to prevent the sequential or simultaneous use of the two criteria, the capability of changing the ranking mode enhances the effectiveness of STEAM suggesting the user always reviews both the resulting sets of similarity maps. The application of the protocol to the case of 23 punctual spectra collected from different zones of the gable of San Diego (Figures 1 and 2) illustrates the STEAM's capabilities for a much more complex experimental situation with respect to the reference panel. The discussion of the panels of Figures 6 and 7 clarifies how the systematic use of both the ranking criteria of STEAM describes the features of the isolated points. The protocol reliably classifies 21 of 23 spectra into two main groups, original and restoration(s) pigments, which in turn can be divided into sub-groups on the base of their signature elements. It would be inappropriate to consider the points' description as complete because the database at our disposal was too small (see Figure 1 to qualitatively compare the dimension of the scanned area with those of the gable) to account for all the significant pigments of the sample, however, a classification of the spectra coherent with Table 2 is achieved (Panel F and E in Figures 6 and 7, respectively). The uncertainties about the assignment of points 5 and 10, or the lack of some features for other spectra (2, 7, 12, or 16 for example) cannot be down-listed as mere fails of the protocol but, rather, considered as areas of the sample worthy of further investigation and at least for new measurements' campaigns. Besides the description of the isolated points and their surrounding regions in terms of main elements' spatial distributions, the application of the protocol to the gable of San Diego proves how STEAM can support the debate about other characteristics of the investigated item: in this case, the protocol fosters the discussion on a crucial issue such as the stratigraphy of the scanned area. A careful evaluation of the sets of similarity maps sheds light on the mutual relationship between Pb and the couple Ca-Sr, the behavior spotted within the small areas pointed out by the purple arrows in Figures 6 and 7 provides confirmation for the hypothesis of stratigraphy given by Galli and co-workers [46]: two superimposed layers where the lower is characterized by Ca-Sr while the upper by Pb.
Finally, we notice that, in both application the panel and the gable cases, the abundance criterion shows an unexpected behavior concerning the ranking of the series. The abundances of Hg L γ in Table 3 and of Ca K β in Table 5 are greater than those of the principal lines of their series, namely Hg L α and L β , and Ca K α, respectively. This is probably due to the low number (i.e., low statistic) of spectra (respectively, 20 for the panel and 23 for the gable) used for evaluating the GSs. The low statistic, together with the weakness of the counts within the energy ranges of the Hg L γ and of the Ca K β , can generate false positives (for spectra from painted regions without Hg or Ca) or missed peaks (for spectra from painted regions containing Hg or Ca) at the energies corresponding to these two series. Considering 20 spectra, a single false-positive or missed peak alters not only the GS but also the evaluation of the abundance for at least the 5% and, consequently, changes the positions of the relative series in the rankings. In general, this issue would deserve a deepen discussion; luckily, the un-expected ranking position for both Hg L γ and Ca K β affect none of the classification steps of the experimental data, as no panel in Figure 4 or Figure 6 deals with Hg L γ or Ca K β . We thus consider this issue of low relevance in the present case.

Conclusions
The information returned by macro-X-ray fluorescence mapping is identified with the spatial distributions of the main elements in the region of the scan and, if SAM's analysis is available, with the description of the spectra as linear combinations of the endmembers. In this general case, the obtained results help to extract the features of the mapped region and, with the support of other experimental and/or statistical methods, the palette of the master, the presence of restorations, or even the stratigraphy of the painting can be inferred with great benefit for both art historians and scientists. The main limitation is that what can be concluded remains constrained within the edges of the scanned area. The Statistically Tailored Elemental Angle Mapper is born in the attempt of extending the knowledge returned by p-MA-XRF imaging outside the acquisition's area(s). In the contest of STEAM, the mapped region becomes a database operating as a starting point for exploring the properties of new sets of data. Starting from the statistical picture given by the global spectrum, STEAM distinguishes the significant series, orders the emission peaks through a suitable criterion, creates a hierarchy, and finally manipulates the spectra enabling the user to extract information evaluating sets of similarity maps. The test performed on the reference panel demonstrates the capabilities of STEAM. Starting from a scenario flattened by the emissions of Pb, the protocol gradually unveils the peculiarities of the sequences until the elemental description of the panel substantially reproduces the properties of the samples. The discussion on the multilayers containing both Red Ochre and Cinnabar shows how the availability of different ranking criteria is a key-turn rather than an optional for the effectiveness of the protocol. The subsequent application of STEAM to the sparse spectra from the gable of San Diego confirms that, even if the mapped region(s) cannot account for all the significant pigments, the protocol reliably classifies most of the isolated points providing a base for discussing and designing a new strategy for the characterization of the sample. In this case, the non-complete answers are due to a lack of a complete and specific spectra database. Besides the description of the XRF spectra, the application to the gable again shows how STEAM can be successfully involved in the determination of a complex issue such as the stratigraphy of the scanned area: the results seem to confirm the hypothesis given by Galli and co-workers [46]. In the shed of these considerations, STEAM can be adopted as an effective tool for extending the information from XRF map(s) outside the narrow edges of the scan(s); moreover, the statistically driven manipulation of the spectra not only points out peculiar details but also can take part in the discussion of several issues related to the experimental system. Surely, the protocol finds its main cue in the pioneering way employed for handling the spectra, but STEAM introduces also other significant novelties. The protocol is independent of the instrument used for acquiring the data; in fact, even if they have been simultaneously used, the spectra from the gable and from the reference panel have been obtained by two different spectrometers. Every database can be employed any time a new characterization is required; it is straightforward that a database can be extensively useful only if the uncharacterized spectra and the database share their principal chemical elements but, also in the unlucky case in which this does not occur, STEAM can even enable the user to exclude some hypotheses in favor of others with an obvious advantage for the time and design of the experimental and analysis campaign. Finally, the possibility of applying multiple criteria gives an essential boost to the power of the protocol: even if the properties of a sample can be considered as largely known, the exclusion of one of the criteria could lower the effectiveness of the analysis as shown discussing the properties of the reference panel. In summary, the statistically tailored elemental angle mapper provides the first attempt to answer one of the new needs of applied X-ray fluorescence: a generalized way for exploiting the big amount of data made available by MA-XRF portable instrumentation. STEAM leaves aside the interest for the single case study or the taste for technological development for introducing an original statistical data handling method. STEAM has been proven to be effective but, at the same time, it has been designed to be always improved by increasing the database with the addictions of even more maps and updating the number or modality of the ranking criteria; therefore, the statistically tailored elemental angle mapper candidates for being the benchmark for the whole p-MA-XRF imaging community.

Acknowledgments:
The authors would like to especially thank Michael A. Brown, Associate Curator of European Art at the San Diego Museum of Art. The spectrometer ELIO has been kindly supplied by XGLab srl, Bruker Nano Analytics Division. For this, we are very grateful to Roberto Alberti and coworkers.