The Advanced Photon Source
a U.S. Department of Energy Office of Science User Facility

XRF-Mapper

The next generation HPC-enabled x-ray fluorescence mapping tool for the APS. It provides implementations of five core mapping algorithms: region-of-interest (ROI), nonnegative least squares (NNLS), singular value decomposition (SVD), Matrix-lmfit, and Matrix-mpfit.

Description

XRF-Mapper is the next generation high-performance x-ray fluorescence mapping tool for the APS. This new multi-threaded C++ implementation will easily run on next generation Intel Phi processors. It currently provides five core mapping algorithms: region-of-interest (ROI), nonnegative least squares (NNLS), singular value decomposition (SVD), Matrix-lmfit, and Matrix-mpfit. The faster ROI method provides a quick view of the data, but may produce incorrect results. Per-pixel Gaussian methods provide high-quality results, but take considerable computation time. The application of a robust optimization algorithm for per-pixel Gaussian fitting approaches, NNLS, greatly accelerates fitting and provides a high-quality result. This high-performance data processing opens the potential to analyze data in near real-time as it streams from the detector, a future direction for XRF at the APS. (Fig. 1).

A website allows APS beamline scientists and users to submit analysis jobs to a cluster of computers for processing. The web page displays the current status of each analysis computer showing CPU, system RAM, and swap hard drive memory

utilization. There are three informative lists for the status of each job, displaying which jobs are queued, processing, and finished. Meta information for each job is saved that records when the job processing was started and finished (Fig. 2).

The engine running the web page is a python application. It exposes a REST web interface that allows other python scripts to submit jobs or get information concerning which jobs are queued. A python script at XSD beamline 2-ID-E checks for completed scans and submits jobs to the web site. The web site then checks to see what analysis computer is free to process the jobs and sends it accordingly. The architecture makes it possible to perform additional tasks when the analysis is complete. For example, users can choose to receive automatic emails with pre-analyzed images as scans finish.

XRF data captured using a tomographic scan protocol can be used to reveal the three-dimensional internal elemental composition of a given sample. However, the resulting reconstruction problem typically is ill-posed and does not have a unique solution because of insufficient measurements. By adding x-ray transmission as a modality to the dataset, one can obtain the spatial distribution of the absorption coefficient inside the sample. To take advantage of the complementary information from different modalities to this limitation, we integrated both modalities, which are concurrently captured during experiment to formulate an optimization approach called “joint inversion.” This simultaneously reconstructs the elemental composition and overall absorption of the sample. The joint inversion can provide a dramatically improved reconstruction result. In particular, the challenges in XRF tomography arising mainly from the effects of self-absorption in the sample are greatly mitigated (Fig. 3 and Fig. 4).

Distribution
https://github.com/AdvancedPhotonSource/XRF-Maps
Acknowledgements

The XRF-Mapper package is a collaboration between Arthur Glowacki, Zichao Di, and Stefan Vogt of the XSD Scientific Software & Data Management, Computational X-ray Science, and Microscopy groups and has allowed the APS to streamline the data analysis with integrated tools, and faster, yet precise, data analysis techniques with funding from DE-AC02-06CH11357.

Argonne National Laboratory is supported by the Office of Science of the U.S. Department of Energy. The Office of Science is the single largest supporter of basic research in the physical sciences in the United States, and is working to address some of the most pressing challenges of our time. For more information, please visit science.energy.gov.