Near real-time management of spectral interferences with portable X-ray fluorescence spectrometers: application to Sc quantification in nickeliferous laterite ores

Since the development of portable X-ray fluorescence (pXRF) spectrometers, few studies have been conducted on the influence of spectral interferences between chemical elements. This study aims to improve the management of these interferences to obtain more reliable geochemical analyses. We specifically investigate Ca-related interferences on Sc analysis for the case of Ni-rich laterite samples using the Niton XL3t GOLDD + pXRF analyser. Three quantification methods were tested on 59 pelletized samples using the ‘Soil’ mode. The first, named ‘Manufacturer’, represents the elemental quantification directly provided by the device based on regions of interest and multilinear corrections of spectral interferences configured during the spectrometer design. The second, the ‘20 Cu’ method, is based on spectral fitting using the PyMCA software. The third, the ‘18 Fe’ method, combines spectral fitting with modified experimental conditions. For each, a quantification methodology was developed, establishing (i) Ca and Sc calibration lines and (ii) Ca/Sc threshold values delimiting fields of ‘reliable’, ‘to be confirmed’ and ‘unreliable’ measurements. The ‘20 Cu’ and ‘18 Fe’ methods greatly extend the ‘reliable measurements’ field concerning the Ca/Sc ratio compared to the ‘Manufacturer’ method. The ‘18 Fe’ method was also found to provide the most negligible measurement dispersion. Supplementary material: Figures A–F and Tables A and B are available at https://doi.org/10.6084/m9.figshare.c.5511838

X-ray fluorescence (XRF) is a non-destructive and multi-element analytical technique routinely used to characterize the chemistry of rocks, minerals, sediments, fluids and soils (Lemiere et al. 2014;Young et al. 2016;Andrew and Barker 2018;Tian et al. 2018;Kim et al. 2019). Several types of XRF spectrometers have been developed, including miniaturized portable XRF ( pXRF) analysers. However, the first pXRFs with multi-element capabilities have been commercially available since 1979 (Glanzman and Closs 2007). Furthermore, since the innovation of the silicon drift detector (SDD) in 1991 (Forster et al., 2011in Cao et al. 2016Lemiere 2018), pXRF analysers have benefited from rapid technical developments and found various applications for environmental (Laperche 2005;Lemiere et al. 2014;Ribeiro et al. 2017;Arantes de Carvalho et al. 2018) andarchaeological (Sanoit (de) et al. 2005;Conrey et al. 2014;Frahm 2017) purposes, and in the field of mineral resource sciences (Konstantinov and Strujkov 1995;Le Vaillant et al. 2014;Hall et al. 2016;Gisbert et al. 2021). pXRF analysers provide cheap, relatively fast geochemical measurements to explore mineral resources and are now routinely used in the field. In this context, several studies have been conducted to assess pXRF analysers' capabilities to analyse various mineral ores. The objective was to improve and guide the use of pXRFs in mineral resource exploration (Gazley et al. 2011a(Gazley et al. , b, 2017Fisher et al. 2014;Hall et al. 2014;Cao et al. 2016;Sarala 2016;Andrew and Barker 2018;Hughes and Barker 2018).
In XRF spectroscopy, several sources of error have to be managed to efficiently quantify the elemental content of samples (Beckhoff et al. 2006). Some artefacts are related to the detector characteristics and include spectral interferences (Thompson, et al. 2001;Sanoit (de) et al. 2005;Conrey et al. 2014;Hall et al. 2014;Quiniou and Laperche 2014;Ibáñez-Insa et al. 2017), pileup and escape peaks (Van Espen et al. 1980;Thompson, et al. 2001;Conrey et al. 2014). Other artefacts such as secondary and higher-order fluorescence are linked to the sample's matrix. The secondary XRF stimulation of a chemical element is caused by the fluorescence of another element present in the sample, such as Fe fluorescence exciting Cr, or Ni fluorescence exciting Fe (Thompson, et al. 2001;Beckhoff et al. 2006). Among these phenomena, spectral interference produced by an abundant element on a trace element remains challenging to manage using pXRF (Conrey et al. 2014;Hall et al. 2014;Le Vaillant et al. 2014;Piercey and Devine 2014;Gazley et al. 2017;Ibáñez-Insa et al. 2017). Most solid-state detector response functions in spectrometers such as the pXRF require a decomposition of the spectrum which is achieved by approximating fluorescence peaks by mathematical functions. The fluorescence signal itself has a Lorentz distribution but it is convolved by the detector response, which has a Gaussian distribution. The resulting function has a Voigt distribution although the Gaussian part dominates the signal, indicating that an initial approach of decomposing spectra using Gaussian functions may be sufficient. A Voigt function, approximated with a pseudo-Voigt, would be preferable for more detailed work (Van Espen et al. 1980;Solé et al. 2007). These mathematical functions are added to a baseline which can be evaluated with polynomial iterative moving averages (Statham 1976) and a sensitive nonlinear iterative peak (Ryan et al. 1988). Mathematical functions add up on the baseline and are adjusted using least-squares fitting (Whiting 1968;Van Espen et al. 1980). On laboratory devices, the elemental quantification of samples is performed after data acquisition using this kind of spectral decomposition supervised by expert staff. However, portable devices process data during acquisition in real time without any input from the user, which means that spectral decomposition is not feasible and pXRF spectrometers usually calculate element concentrations based on regions of interest (ROIs). ROIs correspond to specific spectral bandwidths in which the detected signal is mainly linked to a single specific element. The spectral overlapping of X-ray emission, secondary fluorescence and, for some devices, escape peaks is tabulated in a matrix acting as a multilinear correction for the intensities detected in each ROI. Sum peaks are automatically limited in pXRF by a current regulation in the tube controlled by the count rate in the detector. They are, therefore, of limited influence on the calculation of elemental concentration. The quantification of trace elements in the presence of spectrally interfering major elements remains problematic. Such interferences limit the capabilities of pXRF analysers, particularly in mineral exploration (e.g. Hall et al. 2014). Few studies have specifically investigated the influence of spectral interferences on calculations of element concentrations (Gallhofer and Lottermoser 2018).
This study aims to develop and optimize the quantification of trace elements in the presence of more concentrated spectrally interfering elements. It was applied to nickel-bearing laterites from New Caledonia and conducted with a Niton Xl3t GOLDD+. Figure 1 shows a spectral comparison of the same sample analysed by two pXRF analysersthe Niton, which automatically corrects escape peaks (Fig. 1a) and the XMET, which does not correct escape peaks before spectral processing ( Fig. 1b and c). The automatic correction of the escape peak of the Fe-Kα emission line with the Niton (red vertical line in Fig. 1) leads to the deformation of the baseline, which is only visible on log scale spectra. For a major element such as Ti-Kα, this effect is minor but is greater than the Sc-Kβ signal. With the XMET, the escape peak can be evaluated afterwards on a smoother baseline. Still, the escape peak thus represents another spectral interference that needs to be resolved ( Fig. 1b and c). Hence, in both cases, the escape peak affects the quantification of a trace element (Sc) which is already impacted by the signal of a major element (Ti). A similar effect is observed for the Mn-Kα escape peak on the Sc-Kα and Ca-Kβ emission lines. Investigations here were devoted to evaluating the influence of the spectral interference caused by Ca on Sc estimates due to the proximity between the Kα spectral line of Sc and the Kβ spectral line of Ca (Thompson, et al. 2001;Hall et al. 2014; Figure 1; Table A in Supplementary material). The multilinear regression corrections mathematically reflect the phenomenon of secondary fluorescence on the ROIs of the interfering elements. However, the effect of this phenomenon decreases from V to Ca and it becomes negligible for the Sc quantification compared to its spectral interference with Ca (Thompson et al. 2001). Other essential parameters have been considered, such as the analysis mode and the data processing method (Quiniou and Laperche 2014;Ross et al. 2014).
This paper presents an easy-to-apply solution that enables discrimination between measurements that have been correctly cleaned of spectral interferences and those requiring further correction. Three processing methods that require increasing data processing skills are proposed. The first method (named 'Manufacturer') consisted of reading the data directly on the spectrometer, in which elemental quantification is based on ROIs. The built-in pXRF program solves spectral interferences by applying multilinear corrections. The second method (named '20 Cu') is based on the spectral fitting of the data using the PyMCA software. Spectral interferences are solved by decomposing spectra using mathematical functions added to a baseline evaluation. These first two methods were carried out using the manufacturer's experimental conditions. The final method (named '18 Fe') is based on spectral fitting using PyMCA from spectra acquired with modified experimental conditionsthe voltage in the X-ray tube and the secondary X-ray source.

Geological setting
New Caledonia hosts world-class Ni-rich laterites, which developed after intense weathering of peridotites following Late Eocene obduction (Cluzel et al. 2001;Ulrich et al. 2020). Recently, economically attractive Sc (≈100 ppm) concentrations have been noted in New Caledonian Ni laterites (Audet 2008;Teitler et al. 2019;Ulrich et al. 2019) which means that Sc may become a valuable by-product of Ni-and Co-ore processing. Some laterized amphibolite dykes, locally intruding into the peridotite, have elevated Sc concentrations up to 300 ppm and may constitute standalone Sc targets (Teitler et al. 2019). Above the peridotite bedrock in New Caledonia, Ni-rich laterite profiles typically consist of a succession of weathering facies including (from bottom to top) rocky saprolite, earthy saprolite, yellow laterite, red laterite and ferruginous duricrust. Unweathered peridotite and rocky saprolite  (Solé et al. 2007) for the same laterite sample (e.g. sample containing 2.0% of Ca and 192.9 ppm of Sc) acquired with two portable XRF ( pXRF) spectrometers. Energy range from 1 to 8 keV in which several artefacts encountered in XRF spectrometry is visible. (A) Spectrum acquired with the Niton Xl3t GOLDD + pXRF (Ag anode); (B) spectrum acquired with the XMET 7500 pXRF (Rh anode, (C) zoom of spectrum acquired with the XMET pXRF from 3.6 to 4.8 keV showing the artefacts that can disrupt the scandium quantification such as spectral interferences and escape peaks (Ca-Kα/escape_Cr-Kα; Ca-Kβ/Sc-Kα/escape_Mn-Kα; Ti-Kα/Sc-Kβ/escape_Fe-Kα) where a is the Ca-Kβ emission line, b is the Sc-Kα emission line, c is the escape peak of the Mn-Kα emission line, d is the Sc-Kβ emission line, e is the Ti-Kα emission line and f the escape peak of the Fe-Kα emission line. In addition, a Niton automatically corrects the escape peak of Fe on spectrum while the XMET does not. The automatic correction is seen as a downward peak on the Niton. are dominated by magnesium-rich silicates, whereas iron oxidesoxyhydroxides mainly dominate earthy saprolite, yellow/red laterite and duricrust horizons. Laterized amphibolites differ from laterized peridotites in that they contain significant amounts of kaolinite and gibbsite together with iron oxides-oxyhydroxides (Teitler et al. 2019).

Whole-rock geochemical analysis
Forty-three samples collected at five mining sites and encompassing three types of lithologies (weathered peridotites, weathered amphibolites, unweathered amphibolites) were selected for pXRF analysis. Hand specimens were crushed using an agate bowl pulverizer at the GeoRessources Laboratory. Pulps were analysed at the SARM analytical service using standard procedures (CRPG Laboratory, following Carignan et al. 2001). Major element oxides and Sc were determined using an iCap6500 inductively coupled plasma optical emission spectrometer (ICP-OES) with Li borate fusion. Trace elements were determined using an iCapQ ICP mass spectrometer (ICP-MS) through the nitric acid digestion of fused beads. Loss on ignition was determined on separate aliquots by drying sample powders overnight at 110°C, ignition at 980°C and subsequent measurement of the weight loss. The analytical accuracy (two standard deviations) lies within the typical uncertainty of the analytical data for both major and trace elements, namely less than 1% for major elements and less than 5% for most trace elements. Detailed procedures and limits of detection and quantification are given on the facility website (https://sarm.cnrs.fr/index.html). Scandium and Ca concentrations in the investigated samples vary from 44 to 315 ppm and from 0.01 to 9.4 wt%, respectively. Selected samples correspond to three lithologies: (i) strongly weathered peridotites (Group 1), (ii) fresh to weakly weathered amphibolites (Group 2) and (iii) strongly weathered amphibolites (Group 3). Group 1 was made up of earthy saprolite, yellow and red laterite derived from peridotites, and was the most enriched in Fe 2 O 3 (44.7-73.0 wt%), the most SiO 2 depleted (0.8-21.0 wt%), with Al 2 O 3 ranging from 3.0 to 10.3 wt%. The CaO content of weathered peridotites was low (<0.01-0.40 wt%), and the Sc content was low to moderate (44-97 ppm). Group 2 yielded the lowest Fe 2 O 3 content (7.4-27.9 wt%) together with the highest SiO 2 content (30.8-48.1 wt%). The Al 2 O 3 content varied between 4.4 and 14.9 wt%, CaO was high (4.9-13.0 wt%), and Sc content ranged from 75 to 212 ppm (Teitler et al. 2019). Compared to Group 1, Group 3 was less enriched in Fe 2 O 3 (24.5-55.9 wt%), had higher SiO 2 and Al 2 O 3 (5.7-35.9 and 6.0-23.9 wt% respectively), moderate CaO content (<0.01-2.8 wt%) and a high Sc content (118-315 ppm) (Teitler et al. 2019). The whole-rock geochemical dataset is given in Table B in the Supplementary material.

Sample preparation for pXRF analysis
The selected field samples are representative of the lateritic profile. This kind of profile is marked by abrupt compositional changes that lead to samples clustered as groups in the Ca v. Sc space. However, this study focuses on establishing a methodological approach to quantify a trace element, here Sc,whose emission line is overlapped by that of a major element, Ca. As the detection limit for Sc in those samples was not known at the start of the study, we decided to create composite samples of intermediate composition by mixing field samples to get a more distribution of the measurements in the Ca v. Sc diagrams. Thus, 16 additional samples were prepared by mixing weighted quantities of the collected samples. In total, 59 samples were used for this study (Fig. 2). Powdered samples were formed into 12.4 mm wide pellets using a 10 ton hydraulic press. A powder mass of between 0.6 and 0.8 g was used to ensure a minimum thickness of 2 mm and to prevent pellet degradation over time. Pellets were analysed without using any film between the sample and the spectrometer. This experimental procedure optimizes the signal obtained on light and trace elements (Hall et al. 2014;Adams et al. 2020). Analytical calculations performed with the dedicated module in PyMCA indicate that X-ray absorption through iron oxide samples thicker than 0.5 mm is at least 10 −6 on the 1-8 keV energy range, which is the range of interest in this study (Fig. A in Supplementary material). Therefore, using 2 mm thick samples ensures that samples suit the infinite-thickness model as assumed by the pXRF algorithm.

pXRF
The pXRF analyser used in this study is the Niton TM XL3t GOLDD+, manufactured by ThermoFisher Scientific TM . Its X-ray tube consists of a silver anode operating under a maximum voltage of up to 50 kV. The SDD has an active area of 25 mm 2 and provides a spectral resolution of 130 eV at the Mn-Kα emission line (based on the full width at half maximum at 5.899 keV). Pelletized samples were analysed using a beam 8 mm in diameter.
A pXRF analysis is a two-step process. First, spectra are acquired under controlled analytical conditions and subsequently processed to convert the signals into elemental concentrations. A single measurement displayed on the screen of a pXRF analyser usually corresponds to several analytical conditions. These conditions consist of a specific voltage in the tube and a foil between the tube and the sample. The purpose of the foil is to selectively cut some of the tube signal and/or act as a secondary source. Analytical conditions are named 'beams' in some devices and 'filters' for the Niton series. Four filters are available in the Xl3t for geological applications: Main, Low, High and Light. Each filter is dedicated to measuring a specific set of elements. Quantification of Sc is carried out using the Low filter. Unsurprisingly, tests done on the Main, Low and Light filters to assess the quality of the Sc signal in the corresponding analytical conditions have proved that the Low filter was the one that provides the best signal-to-noise ratio. The Low filter consists of a voltage of 20 kV in the tube, generating a beam passing through a Cu-coated foil before reaching the sample. The absorption edge of the K-shell of Cu is 8.98 keV. The Cu foil acts as a secondary source with Cu-K emission lines effectively absorbed by the K-shell electrons for the elements ranging from K to Co. Fe contents can be very high in lateritic samples and lead to a strong escape peak of Fe interfering with Ti. The Xl3t automatically corrects escape peaks, but that correction is not perfect and may lead to 'downward peaks' that modify the baseline on which fluorescence peaks are built (Fig. 1a).
A new filter was developed to remove that effect, which involved using the Fe foil available in the Xl3t. The XRF of Fe from the foil cannot generate fluorescence of Fe in the sample, which means the Fe signal, including its escape peak, is therefore drastically reduced. As a positive side-effect, removing the Fe signal decreased the count rate in the detector, thus leading to an automatic increase of the current in the tube, which led to higher Ca and Sc signals (Fig. F in Supplementary material). Moreover, the XRF of Fe was more intensely absorbed by Ca and Sc compared to the Cu XRF, which thus further improved the signal-to-noise ratio on these elements. The absorption edge of the K-shell of Fe is 7.11 keV, which is c. 2 keV below that of Cu (8.98 keV). The efficiency of the emission of the secondary source depends on the difference in energy between the signal emitted by the tube and the absorption edge of the element of which the foil is made. Therefore, the voltage in the tube was decreased by 2 kV so that conditions remained comparable to those of the Low filter. The new filter thus consisted of an 18 kV voltage in the tube and a Fe-coated foil acting as secondary source. The precise composition and thickness of foils in the Xl3t are usually not provided to users by Thermo Scientific, unlike other manufacturers.
The second step of pXRF measurements is the conversion of signal intensities to elemental concentrations. In this process, the device first evaluates the signal emitted by each element to be quantified. All portable devices use the same approach to evaluate spectra and display results on the screen during the measurement. The signal from an energy range corresponding to an element is integrated. Energy ranges are called ROIs. For one element, its ROI value is linearly corrected from the contribution of the signal of all the other elements in the same ROI, which means the spectral interferences can be taken into account. An alternative solution is to evaluate a baseline and decompose the signal above this using mathematical functions such as Gaussians or pseudo-Voigt leastsquares fitted to the experimental signal. In this way, the signal from an element corresponds to the function area and is free of interferences. However, users are usually not provided with this solution, even off-line. In this study, the ROI and decomposition solutions were investigated.
Once the signal of one element is evaluated, the conversion into concentrations can be carried out using two classes of algorithms in portable devices. The first is Compton normalization, which corresponds to the 'Soil' mode in the Xl3t (Brand and Brand 2014). Compton normalization is based on a specific matrix type, here Si-rich and Al-rich soils (Mussini 2009;Margui and Van Grieken 2013;Brand and Brand 2014;Conrey et al. 2014;Quiniou and Laperche 2014;Lemiere 2018). In the 'Soil' mode, only samples similar to the matrix used to normalize the signal can be quantified. The Xl3t uses three filters (Main, Low, High) and quantifies Sc. However, applying Compton normalization to lateritic samples dominated by Fe oxides may lead to biased results. The second mode corresponds to a fundamental parameter approach (Brand and Brand 2014), which uses a complete physical model to correct matrix effects and quantify elemental concentrations in most geological samples. These modes include four filters: Main, Low, High, Light. However, the Mining mode in the Xl3t available for this study does not include Sc.
In this paper, results read from the spectrometer using the Low filter in the 'Soil' mode are referred to as 'Manufacturer'. These results, determined by the built-in pXRF programme, are based on evaluating the signal using ROIs. In parallel, spectra obtained with the Low filter and processed as areas of pseudo-Voigt using PyMCA are referred to as '20 Cu'. Finally, results extracted from spectra obtained with the Fe-coated foil excited by an 18 kV voltage in the tube and processed to evaluate the signal as areas of pseudo-Voigt are referred to as '18 Fe' (Table 1).

The optimal conditions for pXRF analysis
To determine the optimal analytical conditions in the Sc spectral region, several metrological tests were conducted before establishing calibration lines such as reproducibility and duration measurements. The reproducibility of XRF analysis was assessed through repeated measures and monitoring of any slow or sudden drift of the spectrometer measurements (Brand and Brand 2014;Gazley and Fisher 2014;Gazley et al. 2017). The optimal acquisition time is the best compromise between accuracy and precision on the one hand, and the acquisition time on the other Hall et al. 2014;Piercey and Devine 2014;Ross et al. 2014). Several durations (30, 60, 90 and 120 s) were used with the Low filter in 'Soil' mode for two weathered peridotite samples and five weathered amphibolite samples, to assess the precision of the Sc analysis. These samples cover the whole range of the analysed Sc concentrations from the overall sample set, with 72, 97, 118, 169, 186 and 315 ppm. The 120 and 90 s acquisition times led to pXRF values close to those obtained from whole-rock ICP atomic emission spectrometry (ICP-AES) analysis. Hence, a duration of 90 s per acquisition was chosen for the following (Fig. B.a in Supplementary material). An additional test was conducted to assess the measurement accuracy. This evaluation identifies the optimal number of analyses that need to be carried out on the same sample to minimize error and increase the associated accuracy. The associated uncertainty was calculated as twice the standard deviation. Monitoring of the standard deviation with an increasing number of repeated analyses (from 3 to 12) indicates that the decrease in the standard deviation value becomes marginal when repeatedly measuring the same sample more than eight times (Fig. B.b in Supplementary material). Consequently, each sample was measured eight times with a 90 s acquisition time. The pellet was laid on the spectrometer nose for each analysis, using the manufacturer's analytical stand.

Software
Raw data (spectra) and interpreted data (element contents) were transferred from the pXRF analyser using the NDT software developed by ThermoFisher. In addition, the NDT Alpha software from ThermoFisher was used to build a specific User Method loaded into the pXRF which provided the '18 Fe' method excitation conditions.
Spectral decomposition in the '20 Cu' and '18 Fe' methods was carried out using the PyMCA software developed by the European Synchrotron Radiation Facility (ESRF; Solé et al. 2007). This software manages peak fitting by considering emission line ratios and includes sum peaks and escape peaks (Fig. 1). Hence, the interferences detailed above were solved and the signal for each element was estimated as the area of the function chosen for the least-squares fitting. The function used with the PyMCA software is the pseudo-Voigt, an approximation of the Voigt, characterized by the sum of a Gaussian with a Lorentzian function with the same position and area (Whiting 1968). The pseudo-Voigt was preferred to the Gaussian as it provided a better fit of the base of a single peak. Such a choice was necessary because the weak Sc signals add to the high-energy base of the strong Ca signal (Fig. 1c).

Quantification methods
The XRF technique offers several approaches that can be used to obtain quantitative results, which can be divided into two main classes: compensation methods (dilution, internal standard, standard addition, Compton scatter) and matrix correction methods (fundamental parameters, empirical influence coefficient, theoretical influence coefficient) (Lachance and Claisse 1995;Sitko and Zawisza 2012;Piercey and Devine 2014). All these methods require some knowledge of chemical analysis or XRF spectroscopy. In this study, we intend to construct a method that can be implemented by users who are not experts in XRF and therefore we use calibration curves. These curves have been determined from standards which are samples of a known chemical composition similar to that of the sample to be assayed (Laperche 2005;Arne et al. 2014;Gazley and Fisher 2014;Le Vaillant et al. 2014;Sarala 2016;Gazley et al. 2017;Andrew and Barker 2018;Hughes and Barker 2018;Lemiere 2018). In our study, 11 samples were used as standards. They were chosen to (i) group together a range in which most of the samples were contained in the Ca-Sc space (Fig. 2), (ii) include some reference samples inside this group, (iii) limit the number of standards to a small amount.
The pXRF devices automatically adapt the current in the tube to reach an optimal dead time, meaning that elemental signals obtained from spectra must be normalized to the tube current to become comparable. The device automatically performs such an operation for its internal quantification, and therefore no manual normalization is required for the 'Manufacturer' method. However, normalization still needs to be carried out for the '20 Cu' and '18 Fe' methods and the NDT software does not provide this information. Although the NDT_Alpha software does provide this information, we decided to evaluate this from the spectrum. Scattered data from the specific emission lines of Ag from the anode of the tube and scattering of the bremsstrahlung of the tube or the Ar signal were among the possible solutions available. Under the selected analytical conditions, Ag does not emit fluorescence on its K-lines because the voltage in the tube is too low. The Ag-L lines are absorbed by the Cu-or Fe-foils and cannot be scattered by the sample. Scattering of the bremsstrahlung can be measured at c. 16 keV where there is no signal emitted from the sample, but this requires an extra processing step. The Ar signal arises from the air layer between the tube and sample. As pellets of similar geometry are analysed, the thickness of that air layer is constant and the Ar signal is directly proportional to the current in the tube. A plot of these signals against the current in the tube is provided as Supplementary material in Fig. C. As Ar, Ca and Sc can be measured simultaneously, Ar-peak normalization was chosen in this study (Menez 1999;Cauzid 2005;Shao et al. 2020).
The calibration curve must be established using reference samples that are accurately measured using pXRF. This recommendation is not guaranteed as some reference samples have a low Sc content or high Ca/Sc ratio. Hence, a series of reference samples were selected for which the pXRF data could be expected to be accurate. The chosen criteria were: (i) an Sc concentration of at least 100 ppm, well above the detection limit or limit of determination (LoD) for Sc as advocated by the manufacturer (Sc-LoD is 75 ppm within the Si-Ca-Fe matrix according to Niton data), (ii) a limited Ca-Kβ/Sc-Kα interference with a Ca-Kβ emission line intensity of around 10 times the emission of the Sc-Kα line. To roughly evaluate the second condition, the Ca-Kβ emission line was considered to be c. 10 times less intense than its Kα emission line. The Ca concentration of these samples was limited to 1% given this ratio and because the minimum Sc concentration of the reference samples used during this first step was 100 ppm. A first calibration curve was drawn from the four samples that satisfied these Sc (>100 ppm) and Ca (<1%) conditions. This first calibration curve was defined with a zero intercept. Next, the standard deviation was calculated from the 32 measurements available for these four samples. Standards whose average value fell within plus or minus twice this standard deviation were selected in a second step to calculate the calibration line with a non-zero intercept. Following these steps allowed us to automatically exclude the reference samples that were not accurately measured by pXRF due to spectral interferences between the Ca-Kβ and Sc-Kα emission lines. Figure 3 shows the calibration curves defined by linear regression of the data obtained with the 'Manufacturer' method. The Sc concentrations directly provided by the pXRF are not equal to the actual Sc concentrations obtained by the SARM service analysis. The first evaluation of the calibration curve with a zero intercept has a determination coefficient of 0.67. In contrast, the final calibration line has a slope of 2.45, an intercept of −89.96 and a determination coefficient of 0.84. The limit of determination, i.e. the lowest concentration that can be determined, was defined as the concentration for which the errors become equal to or greater than the concentration. The error was evaluated as being twice the standard deviation. Using this evaluation, the limit of determination for Sc with the 'Manufacturer' method is 79 ppm.

Results
Moreover, some standards and sample values do not have an average value within a ±2σ interval around the regression line (Fig. 3a). For Ca, the final calibration line has a slope of 0.93, an intercept of 1058.44 and a determination coefficient of 0.998 (Fig. 3b). Therefore, the limit of determination for Ca with the 'Manufacturer' method is 2500 ppm. The dispersion of the results for each standard or sample increases according to the Ca concentration. Hence, the 2σ value calculated on the whole dataset overestimates dispersion at lower values, so Ca is most probably correctly quantified at concentrations below 2500 ppm.
Only one of the standards was not correctly quantified for Sc. It is included in the graph on the upper limit of the confidence interval (y = ax + b + 2σ line). Therefore, the Sc content of this sample (80 ppm) is at the limit of determination for Sc. All of the other incorrectly quantified standards and samples stand on or below the lower limit of the confidence interval (y = ax + b−2σ line). Figure 4 was drawn up to investigate the importance of the Ca-Kβ spectral interference on estimation of Sc pXRF concentrations. It shows the deviation from the calibration line in ppm, calculated as the difference between the whole-rock Sc concentrations, and pXRF Sc values (Sc whole rock -Sc manufacturer ) as a function of the intensity of the spectral interference, calculated as the ratio between the Ca and Sc concentrations (Ca Manufacturer /Sc manufacturer ). The average Sc whole rock -Sc manufacturer value for each set of eight reliable measurements on a standard or sample should be between + 2σ and −2σ. Samples standing below the lower limit of the confidence interval ( y = ax + b −2σ line) have values lower than -79 ppm on the ordinate axis in Figure 4. Conversely, samples standing above the upper limit of the confidence interval (y = ax + b + 2σ line) have values higher than 79 ppm on the ordinate axis. All samples standing on or below the lower limit of the confidence interval in Figure 3 have high (Ca Manufacturer /Sc manufacturer ) in Figure 4. They also have Ca concentrations above 1 wt% (Fig. 5). Figure 4 shows three fields defined by two limits. Limit 1 is set at the lowest Ca/Sc ratio value obtained on an incorrectly quantified standard. Limit 2 is set at the highest Ca/Sc ratio value obtained on an accurately measured standard. In the green field below Limit 1 (Ca/ Sc values below 67), Sc concentrations of standards are systematically correctly evaluated (Limit 1). Scandium concentrations of standards may or may not be correctly assessed in the orange field between Limit 1 and Limit 2 (Ca/Sc values ranging from 67 to 104). Finally, in the red field above Limit 2 (Ca/Sc values above 104), Sc concentration is systematically overevaluated (Fig. 4).
Two samples are located in a non-adapted coloured field (Fig. 4). The sample with 80 ppm Sc at upper values of the confidence interval under the LoD in Figure 3 corresponds to the series of red points following the upper limit (y = ax + b−2σ) dotted-point-line at 80 (Sc whole rock -Sc Manufacturer ) on Figure 4, with Ca/Sc values Fig. 4. Threshold values of the Ca/Sc apparent concentration. The ratio defined as Limit1 corresponds to Ca/Sc of 67, under which the Ca-Sc spectral interference is correctly solved. Limit2 corresponds to Ca/Sc of 104, above which the spectral interference is never solved. Diamonds with black edges correspond to the 11 standards used to build the calibration line. Diamonds without an edge line correspond to the samples used for checking the calculated calibration line. Blue diamonds correspond to standards or samples for which the average of their eight measurements falls within ± 2σ from the Sc calibration curve. Red diamonds correspond to standards or samples for which the average of their eight measurements falls outside the ± 2σ interval. Bold solid black lines correspond to the Ca/Sc under which Sc values are correctly evaluated. Bold dashed black lines correspond to the Ca/Sc above which Sc values are never accurately assessed. ranging from 0 to 1800. Another sample is located below Limit 1 while not being correctly quantified (Fig. 4). It corresponds to the sample at lower values of the confidence interval in Figure 3 with a Sc concentration of 265 ppm.
The Limit 1 and Limit 2 threshold ratios, together with the Sc-LoD, can be represented in a Ca v. Sc biplot, thus defining three fields (Fig. 5). The green field (reliable measurements), situated below Limit 1 and above the Sc-LoD, corresponds to Sc values that are always correctly evaluated. The orange field above the Sc-LoD, and between Limit 1 and Limit 2, corresponds to Sc values that may or may not be correctly assessed. The red field (erroneous measurements), above Limit 2 or below the Sc-LoD, corresponds to Sc values that are never accurately evaluated. Calcium and Sc concentrations obtained from whole-rock and pXRF analysis are also presented in Figure 5 to show the accuracy and precision of pXRF estimates compared to whole-rock data. For each of the standards and samples analyzed, the concentrations of Ca and Sc corresponding to the whole-rock values are represented as crosslinked by a black point. The cross shows the minimum and maximum values obtained for Ca and Sc using pXRF. Calcium and Sc concentrations obtained with the 'Manufacturer' method have been converted to actual concentrations using calibration lines as defined in Figure 3. In the green field, Sc pXRF estimates are consistent with concentrations obtained from the whole-rock analysis, whereas Sc is systematically overestimated in the red field (Fig. 5). The sample plotted horizontally in Figure 4 at the upper limit (y = ax + b−2σ) could not be shown in Figure 5 as the Sc concentrations calculated using the regression line led to negative Sc values.
The Sc calibration lines for the '20 Cu' and '18 Fe' methods are given in Figure 6. The precision of the Sc values is significantly better using the latter method (2σ = 51 ppm) than the former (2σ = 84 ppm). Fitting the data with pseudo-Voigt functions enabled us to estimate accurate Sc values when using the '20 Cu' method ( Fig. 6a). With the '18 Fe' method ( Fig. 6b), only one sample does not exhibit correct estimation of the Sc content due to a Ca content above 3 wt%.
The calibration lines for Ca and ((Sc whole rock -Sc) v. (Ca/Sc)) diagrams for the '20 Cu' and '18 Fe' methods are available in Figs D and E of the Supplementary material. These two methods correctly evaluated all standards. Therefore, only one limit was determined, namely Limit 2 at Ca/Sc = 1822 for the '20 Cu' method and at Ca/ Sc = 2887 for the '18 Fe' method. Hence, the field between Limit 1 and Limit 2, which included a mixture of accurate and inaccurate results, could not be drawn. Therefore, two fields are evident: 'reliable values' in green and 'unreliable values' in red.
In the Ca v. Sc biplots for the '20 Cu' method, all the processed analyses are above the Sc-LoD and fall within the ± 2σ interval (± 84 ppm) from the calibration line, i.e., within the reliable measurements field (in green on Fig. 7a). On the other hand, the '18 Fe' method ( Fig. 7b) shows only one sample (3.5 wt% Ca and 212 ppm Sc) on the entire dataset that is outside of the ± 2σ interval.

Discussion
In the following, we shall first discuss the causes for the discrepancy between Sc concentrations directly provided by the pXRF ('Manufacturer' method) and actual Sc concentrations obtained from the whole-rock analysis. We shall then discuss the relevance of the different methods regarding the analytical precision and management of the spectral interference caused by Ca.

Slope of the Sc calibration line
The slope of the Sc calibration line obtained with the 'Manufacturer' method (i.e. Sc concentrations directly provided by pXRF; Fig. 3) is  about twice the expected 1:1 slope. Such an anomalously elevated calibration slope may be related to the use of the 'Soil' mode. The 'Soil' mode quantification process is based on a Compton normalization and calibrated for a silico-aluminous matrix (Hall et al. 2014;Quiniou and Laperche 2014;Ross et al. 2014). In the present case, the analysed samples are dominated mainly by iron oxides. Establishing this type of correlation using the 'Mining' mode based on fundamental parameter algorithms would have probably resulted in a slope closer to one (Hall et al. 2014;Quiniou and Laperche 2014). However, the current manufacturer configuration for the Niton TM XL3t GOLDD + available for this study only allows Sc quantification through the 'Soil' mode. A standard user cannot access the internal parameters and algorithms of the different pXRF analytic modes (Brand and Brand 2014) and, as such, cannot add an element into a specific mode.

Optimization of analytical precision
The repetitive analysis of selected standards provides helpful information regarding measurement precision. The 2σ error is calculated for Sc with the whole set of standards and not as the average of the 2σ interval for each standard. Values obtained with the 'Manufacturer' and the '20 Cu' methods are similar (79 and 84 ppm, respectively). In contrast, the '18 Fe' method was found to improve the precision with the 2σ interval decreasing to 50 ppm. A better understanding of the source of errors in the spectral fitting process is required to improve analytical precision. Spectral decomposition in pseudo-Voigt functions is built upon a baseline evaluated from the spectrum (Fig. 1). Firstly, the baseline calculation is sensitive to the noise visible as high-frequency variations in the spectrum (Solé et al. 2007;Tian et al. 2009;Margui and Van Grieken 2013). Secondly, escape peaks are automatically corrected with the Niton XL3t device. This correction cannot always be optimal and sometimes generates sharp spectral artefacts peaking down on the spectrum. These peaks are of limited depth and become visible using a logarithmic vertical scale. However, they slightly influence the baseline position and the least-squares fitting of the pseudo-Voigt. Thirdly, low-frequency background noise, mainly from Compton and bremsstrahlung physical phenomena, also affects the baseline. The nature of some secondary sources (Al, Ti, Zr, Mo and W) can influence the latter phenomenon (Tian et al. 2009).
The noise appears as sharp peaks up and sharp peaks down. These can be seen at low energy on Figures 1a and b and the position of the automatically corrected Fe-escape peak in Figure 1a. Although these do not appear as sharp peaks on more intense emission lines (Ca, Ti, Fe-escape on Fig. 1c), they still slightly modify the peak shape. The exact position of sharp peaks up and sharp peaks down, or the modification of peak shapes, changes from one measurement to the next. The least-squares fitting calculates the difference between the experimental value and the value of the pseudo-Voigt in each channel, squares the difference and finally sums the squares. The process then modifies the pseudo-Voigt height to minimize the sum of squares of the differences. The height of the pseudo-Voigt will then depend on the exact shape of the noise, which changes with each measurement. This noise influence will be more significant for peaks of lower intensity, such as that of Sc. Hence the noise has a substantial impact on peak areas used to build the calibration curve in the '20 Cu' and '18 Fe' methods. In contrast, ROIs integrate the signal over a significant width, which will end in an almost constant value from one measurement to the next, making ROIs less sensitive to noise. The consequence of this is the higher dispersion observed with the '20 Cu' method (2σ = 84 ppm) compared to the 'Manufacturer' method (2σ = 79 ppm) (Figs 3a and 6a; Table A in Supplementary material) when processing the same spectra.
The design of the '18 Fe' mode aims to counteract these effects. A Fe-coated secondary source was explicitly built to decrease the Fe signal, limiting the Fe-escape peak drastically. It is unknown whether using a pXRF analyser in which the escape peaks are not automatically corrected (e.g. XMET or Tracer) would improve or degrade the fitting. Uncorrected escape peaks would have to be fitted, and this would also affect the data processing steps. PyMCA implements an escape peak fitting capability that would make this kind of evaluation possible (Solé et al. 2007;Schoonjans et al. 2013). Also, by decreasing the energy of the pXRF emission from the Cu-K lines to the Fe-K lines, Sc ionization is improved. Consequently, the '18 Fe' mode provides a better signal-to-noise ratio on the Sc-Kα line (Figs 6b and 7b; Fig. F in Supplementary material). Other modes using lower voltages (7 and 8 kV) without a secondary source were also tested but led to a much higher Ca emission, masking the Sc signal. This observation highlights the importance of the nature of beam conditions, namely tube voltage and secondary source, to quantify elements of interest.

Spectral interference management
This study demonstrates that substantial Ca concentrations result in overestimating the Sc content when using the 'Manufacturer' method. The Ca/Sc spectral interference effect is shown in (Sc whole rock -Sc) v. Ca/Sc diagrams (Fig. 4). At low Ca/Sc, sets of eight measurements performed on a single sample align almost vertically. This kind of subvertical alignment results from the inherent dispersion of the Sc estimates around the average value, while the Ca/Sc (horizontal axis) is correctly evaluated. Moreover, the dispersion along the vertical axis is spread around a zero value, which means that the average of the eight Sc measurements is close to the whole-rock Sc concentration. At high Ca/Sc, sets of eight measurements performed on a single sample align along inclined trends. The inherent dispersion of the Sc estimates is still visible as a variation along the vertical axis but is no longer centred on a correctly estimated average value. These measurements are found at negative Sc whole rock -Sc manufacturer values, which means that pXRF overestimates Sc concentrations in these samples. The trends show a positive slope which means that most overestimated Sc concentrations plot at lower Ca/Sc. Thus, part of the Ca signal in the ROI is considered as Sc by the quantification procedure. The same effect with inclined trends at high Ca/Sc remains visible on the '20 Cu' and '18 Fe' methods. Still, the dispersion along the vertical axis remains spread around a zero value, which means that the average of the eight Sc measurements is close to the whole-rock Sc concentration. The 'Manufacturer' quantification method provides accurate Sc values below a Ca/Sc of 67. Both the '20 Cu' and '18 Fe' methods provide reliable Sc estimates at higher Ca/Sc. One sample in the 'Manufacturer' method and another in the '18 Fe' method do not show correctly evaluated Sc concentrations while plotting in the field of the reliable data. Such a result remains compatible with a 2σ interval, meaning that 95% of the calculated values are correctly evaluated.
The three methods exposed in the present study require increasing skills in data processing and tuning of analytical conditions. It is easier to use the device's data than reprocessing spectra. It is easier to use the analytical conditions provided by the manufacturer than to change the tube voltage and choose the best-adapted secondary source. The effort required for data acquisition or processing depends on the kind of limitations encountered during the measurements. If the Sc concentration is high enough but suffers from a high Ca signal interference, then only data reprocessing is required. If the Sc concentration is low and the limit of determination needs to be improved, then the analytical conditions have to be modified.
In methods '20 Cu' and '18 Fe', standards with more than 84 and 50 ppm of Sc, respectively, and higher Ca/Sc than those available from the chosen geological context could have given the position of Limit 1 and provided the field in which any results may or may not be reliable. This field may be present on the diagrams shown in Figure 7 as Limit 1 is below Limit 2. Hence, while building a solution to use this method, a standard needs to be found or constructed containing the element of interest above its limit of determination (here Sc) and with an excess of the highly concentrated interfering chemical element (here Ca).

Conclusion
Scandium analysis in iron oxides using pXRF is a challenge due to low concentrations close to the limit of determination and matrix effects. However, when deconvoluting spectral interferences and taking escape peaks and manufacturer data into account, the potential of pXRF is more significant than initially thought. Therefore, a new method has been developed to quickly assess whether a trace element analysis is valid within an acceptable error range when the matrix contains a spectrally interfering major element.
Specifically, four steps are required: (i) select a set of standards covering the expected concentration range of the major and trace element, (ii) determine LoDs and calibration lines for major and trace elements, (iii) use a diagram that provides the major/trace threshold ratios below which the trace element values are correct, and (iv) use the threshold values (LoDs, Limit 1 and Limit 2) to assess whether the values obtained for unknown samples are reliable or not. This step is applicable regardless of the chosen method (i.e. manufacturer or spectral decomposition with or without tuning the experimental conditions). After measuring the standards and processing their data, all values can be read on the device screen as user-defined calibration lines can be implemented and element ratios can be defined in reference. The unexpected outcome of this study is that this procedure requires at least one standard with Sc above LoD and Ca/Sc too high to allow an accurate quantification. It therefore requires a standard (material of precisely known concentrations) that cannot be adequately measured by the device. Nevertheless, it is the only solution that delimits the field of 'samples that may or may not be correctly quantified'.
A careful analysis of spectra may significantly improve the confidence and the field of application for pXRF measurements. Furthermore, the processing steps described in this study can be automated. This kind of approach can be applied to any type of interfering emission line. It can be implemented for repetitive tasks and used as a test study without requiring new quantification programmes from the pXRF manufacturer. Testing the Fe-Kβ/Co-Kα interference for Ni-bearing laterites would also be necessary, as Co is an economically attractive by-product in such deposits.