## 5 Conclusions  
This study highlights the potential of portable XRF analyzers for a fast, cheap, and reliable analysis of heavy metals and trace elements in organic amendments (composts, sewage sludges, and organic fertilizers), even if these elements cannot be directly determined by the analyzer due to them being below their limits of detection. Using a chemometric procedure based on multiple and simple linear equations, the elements As, Cd, Cr, Ni, Hg, and Se were predicted quantitatively. Predictive linear equations were created that included as the most important terms the readings obtained with pXRF for a few elements to which a different origin or source can be attributed. The elements Fe, Si, Ti, Cl, and Zr indicate a geological or pedogenetic origin; the elements Zn and Pb signify contamination of an anthropogenic origin; and the element P denotes an agricultural/anthropogenic influence. The readings of the elements Al, K, Ca, S, Mn, and Ba were also present in the equations as secondary factors. The degree of importance of each factor was dependent on the predicted target element as well as on the type of amendment (compost, sewage sludge, organic fertilizer) in question. Considering that the correction factors only made use of the pXRF analyzer readings, and that the scans required a very short analysis time (3.5 min), the proposed analytical approach could be usable in field conditions without requiring other additional parameters that must be obtained in the laboratory. Although the calibration equations obtained in this study were obtained with a well-characterized set of samples of compost, sewage sludge, and organic fertilizers from various European countries, their universal validity may be questionable. It could be possible that the factors found or their relative weights were different depending on the materials present in the amendments, the regional geological or edaphic characteristics, and the possible sources of anthropogenic contamination. It would be necessary to obtain specific calibrations for other types of amendments, for example, manure, and this would be possible as long as a homogeneous group could be separated. For samples of amendments of an unknown type, we understand that it would be feasible to first apply a process to classify the sample according to its analytical results (discriminant analysis or similar) and then apply the corresponding calibration. In addition, specific (locally or regionally adapted) and interlaboratory calibrations should be obtained to assess the generalization of the relationships found or to find those specifically adapted. However, although the results presented here show a high degree of consistency with basic knowledge about organic amendments, soil science, and potential sources of contaminants, a more detailed analysis of the statistical quality of the forecast equations is still needed. Specifically, subsequent calibration studies should be carried out that expand the number or types of sample to corroborate the results of this work, taking into account the compositional nature of the data [38]. The cross-checking of equipment from different brands and suppliers is also necessary. In any case, the proposed analytical approach would be very useful for quality control and regulatory compliance tasks in waste treatment facilities (composting plants, wastewater treatment plants) or the manufacturing of organic amendments, avoiding much more tedious routine analytical procedures. In these situations, we believe that the pXRF technique represents a valuable decision support tool aimed at proper environmental management.