computer programs
HERMES – a GUI-based software tool for pre-processing of X-ray absorption spectroscopy data from laboratory Rowland circle spectrometers
aDepartment of Materials Science and Engineering, University of Sheffield, Mappin Street, Sheffield S1 3JD, United Kingdom, and bDepartment of Computer Science, University of Sheffield, Regent Court, Sheffield S1 4DP, United Kingdom
*Correspondence e-mail: n.c.hyatt@sheffield.ac.uk
HERMES, a graphical user interface software tool, is presented, for pre-processing data from laboratory Rowland circle spectrometers, to meet the data handling needs of a growing community of practice. HERMES enables laboratory data to be displayed for quality assessment, merging of data sets, polynomial fitting of smoothly varying data, and correction of data to the true energy scale and for dead-time and leakage effects. The software is written in Java 15 programming language, and runs on major computer operating systems, with graphics implementation using the JFreeChart toolkit. HERMES is freely available and distributed under an open source licence.
Keywords: XAS; XANES; XAFS; laboratory spectrometer; data processing.
1. Introduction
The renaissance of laboratory et al., 2019; Honkanen et al., 2019; Jahrman et al., 2019a; Schlesiger et al., 2015; Malzer et al., 2018; Mortensen et al., 2016; Németh et al., 2016; Seidler et al., 2014, 2016; Zeeshan et al., 2019). In particular, commercial and user-built instrumentation based on a Rowland circle spectrometer with spherically bent crystal analyzers (SBCAs) used in the Johann configuration, and utilizing an energy-dispersive X-ray (EDX) detector, are gaining adoption, both as laboratory and regional facilities with a role complementary to, and symbiotic with, use of synchrotron radiation sources (Ditter et al., 2019). Already, this spectrometer design has been exploited to address a wide range of problems in nuclear, functional, catalysis and geological materials, including operando studies (Bès et al., 2018; Bi et al., 2019a,b; Jahrman et al., 2019b; Kuai et al., 2018; Lutz & Fittschen, 2020; Mottram et al., 2020a,b,c; Moya-Cancino et al., 2019; Nolis et al., 2020; Sun et al., 2021; Wittkowski et al., 2021; Zimmermann et al., 2021).
instrumentation is revolutionizing access to, and uptake of, this technique across the physical sciences and engineering, enabling application of this technique without the need for access to a synchrotron light source (BłachuckiThe rapid uptake of the Rowland circle It) and without (I0) the sample, to compute the absorption; whereas, at a synchrotron source, I0 and It would be acquired simultaneously. Recently, Bès et al. (2018, 2021) have demonstrated an elegant procedure for acquisition of I0 and It simultaneously, by exploiting SBCA harmonics, although this is not always applicable. Raw data also need to be quality assessed, dead-time corrected, appropriately merged, and corrected to the true energy scale and for leakage effects. Although data processing codes have been developed within Jupyter notebook and Mathematica environments, they require some familiarity with coding to use efficiently and troubleshoot problems. However, this may not necessarily be within the grasp of a broad user base, for whom is a supplementary or infrequent analytical tool. We therefore developed HERMES as software based on an intuitive graphical user interface (GUI), to enable rapid and robust pre-processing of laboratory data from Rowland circle spectrometers, for import into software such as ATHENA for further analysis (Ravel & Newville, 2005). Subsequently, the HERMES backronym was later coined – Handy Energy Recalibration and Mu Evaluation Software.
spectrometer is driving an expansion of the user base for the technique, who require tools to integrate and pre-process data for further analysis. This need arises because, typically, several scans are acquired with (HERMES is free to download and distributed under an Open Source Initiative approved MIT Licence (Open Source Imitative, 2021), and documentation is distributed under a Creative Commons CC BY 4.0 licence (Creative Commons, 2021), enabling users to adapt and modify the source code to better meet their needs, as may be desirable. HERMES is written in Java 15 and compiled and tested to work on the common laboratory Microsoft Windows and Macintosh OSX platforms. Plotting graphics are implemented using JFreeChart (JFreechart, 2021). Java was chosen for implementation due to its strong object orientation and type safety.
2. Features of HERMES
HERMES is a program for pre-processing of transmission mode laboratory X-ray absorption spectroscopy data, from Rowland circle spectrometers, to produce input files suitable for further analysis using software such as ATHENA. It provides the following functionality:
(i) Dead-time correction of raw data.
(ii) Plotting and comparison of multiple I0 and It data.
(iii) Fitting of a polynomial to suitable I0 and It data.
(iv) Merging of several I0 and It data sets.
(v) Evaluation of absorption μ(E) from I0 and It data.
(vi) Correction of data for leakage effects.
(vii) Recalibration of data energy scale.
HERMES uses a logical workflow to guide the user through the steps of data pre-processing. The dashboard has a simple and intuitive interface, with four data workspaces and processing tools, shown in Fig. 1. The user specifies the Measurement Type to be loaded or processed using a dropdown menu (I0, It, I0 leakage, It leakage). The user is required to select appropriate columns for energy, theta, detector raw counts, detector input count rate (ICR), and detector output count rate (OCR). A first-order dead-time correction is applied to raw detector counts, valid for dead-time up to 50% (XIA LLX, 2009). The plotting function supports enlargement of regions of interest and data may be displayed individually, overlaid or offset (by a user-specified amount), as shown in Fig. 2. An nth-order polynomial (where n is user specified) may be fitted to any appropriate and smoothly varying data set selected (i.e. I0, I0,lk, It,lk; where lk denotes a leakage measurement, as discussed below).
After the user has completed plotting, assessment, merging and polynomial fitting of raw data in the first tab of the dashboard, the workflow progresses naturally to the second tab where the user may evaluate and inspect the μ(E). If the specimen is sufficiently thick and/or attenuating it may be desirable to correct the computed absorption data for `leakage effects' (Stern & Kim, 1981; Mottram et al., 2020a) which may arise from contamination of the transmission data by harmonics, stray scatter and the low energy tail of the monochromator function; this correction is effected by a tick box. In the Rowland circle geometry, it may be necessary to measure transmission data with a large detector offset (I0,lk and It,lk), to correct the absorption data for distortion arising from leakage effects according to equation (1),
Where leakage effects are not important, then I0,lk = It,lk = 0. The fitted polynomials, without Poisson noise, may be used to evaluate the absorption, if desirable and appropriate.
Evaluation of absorption requires the user to specify one data set each of I0 and It (plus I0,lk and It,lk, if required), which may be raw, merged or polynomial fitted data. The absorption is displayed as a function of energy and theta. The computed absorption, merged, and polynomial fit data are written as text files, at the point of computation, together with a list file to enable data provenance and curation.
The third tab in the HERMES workflow enables calibration of the absolute energy scale of absorption spectra evaluated in the previous workspace. In general, the absolute energy scale of laboratory data requires calibration using a suitable reference material, for which there are calibrated literature, open source or user-acquired data. Rowland circle spectrometers function on an angle-dispersive principle to maintain the required focusing condition. Steps in energy or k-space, within user-specified ranges, determine the required steps in theta space according to the Bragg Law,
where Emono is the characteristic backscatter energy of the SBCA. HERMES determines Emono from a user-specified within the workspace. Since the relationship between energy and theta is non-linear, it is necessary to apply the correction in theta space and then recalibrate the energy scale. HERMES requires the user to specify the observed and true energy (Eobs and Etrue) of some feature in the absorption spectum, such as the maximum in the first derivative of μ(E). From equation (2), the corresponding θobs and θtrue are determined, the difference between these values being the Δθshift required to align the in theta space. The is calibrated by applying the theta shift to the observed data and calculation of the true energy, from equation (2). The original and calibrated are plotted in energy and theta space for inspection, post calibration. The calibrated is written as a text file, at the point of computation, with both original and calibrated energy and theta scales, together with a list file detailing the key calibration parameters.
A comprehensive user guide and video tutorial are provided to support use of the software (see the supporting information).
3. Conclusions
We have presented the HERMES software for pre-processing of laboratory X-ray absorption spectroscopy data from Rowland circle spectrometers. A simple GUI and intuitive workflow enable integration, correction and calibration of raw data to output data files suitable for further analysis in software such as ATHENA. This software contributes to meeting the need of a rapidly growing community of practitioners, who require freely available tools for rapid and robust pre-processing of laboratory data.
4. Resources
A project page for HERMES exists at https://github.com/xasheffield/hermes. HERMES is available as an executable .jar file (Windows, MacOS, requiring an existing installation of Java) or as a .exe file with the necessary Java Runtime bundled (Windows only), and both are freely available at the link above, as well as a complete user manual; a tutorial video is available (see the supporting information).
Supporting information
HERMES user guide. DOI: https://doi.org/10.1107/S1600577521012583/ok5064sup1.pdf
HERMES video tutorial. DOI: https://doi.org/10.1107/S1600577521012583/ok5064sup2.mp4
Acknowledgements
LMM is grateful to the UK EPSRC for providing a studentship.
Funding information
The HERMES software was developed with resources of EPSRC Impact Acceleration Account at the University of Sheffield under grant EP/R511754/1 and the HADES/MIDAS facility at the University of Sheffield established with financial support from EPSRC and BEIS, under grant EP/T011424/1 (Hyatt et al., 2020).
References
Bès, R., Ahopelto, T., Honkanen, A. P., Huotari, S., Leinders, G., Pakarinen, J. & Kvashnina, K. (2018). J. Nucl. Mater. 507, 50–53. Google Scholar
Bès, R., Takala, S. & Huotari, S. (2021). Rev. Sci. Instrum. 92, 043106. PubMed Google Scholar
Bi, W. C., Huang, J. J., Wang, M. S., Jahrman, E. P., Seidler, G. T., Wang, J. C., Wu, Y. J., Gao, G. H., Wu, G. M. & Cao, G. Z. (2019a). J. Mater. Chem. A, 7, 17966–17973. CrossRef CAS Google Scholar
Bi, W. C., Wang, J. C., Jahrman, E. P., Seidler, G. T., Gao, G. H., Wu, G. M. & Cao, G. Z. (2019b). Small, 15, 1901747. CrossRef Google Scholar
Błachucki, W., Czapla-Masztafiak, J., Sá, J. & Szlachetko, J. (2019). J. Anal. At. Spectrom. 34, 1409–1415. Google Scholar
Creative Commons (2021). Attribution 4.0 International licence (CC BY 4.0), https://creativecommons.org/licenses/by/4.0/. Google Scholar
Ditter, A. S., Jahrman, E. P., Bradshaw, L. R., Xia, X., Pauzauskie, P. J. & Seidler, G. T. (2019). J. Synchrotron Rad. 26, 2086–2093. Web of Science CrossRef CAS IUCr Journals Google Scholar
Honkanen, A. P., Ollikkala, S., Ahopelto, T., Kallio, A. J., Blomberg, M. S. & Huotari, S. (2019). Rev. Sci. Instrum. 90, 033107. CrossRef PubMed Google Scholar
Hyatt, N. C., Corkhill, C. L., Stennett, M. C., Hand, R. J., Gardner, L. J. & Thorpe, C. L. (2020). IOP Conf. Ser.: Mater. Sci. Eng. 818, 012022. Google Scholar
Jahrman, E. P., Holden, W. M., Ditter, A. S., Mortensen, D. R., Seidler, G. T., Fister, T. T., Kozimor, S. A., Piper, L. F. J., Rana, J., Hyatt, N. C. & Stennett, M. C. (2019a). Rev. Sci. Instrum. 90, 024106. CrossRef PubMed Google Scholar
Jahrman, E. P., Pellerin, L. A., Ditter, A. S., Bradshaw, L. R., Fister, T. T., Polzin, B. J., Trask, S. E., Dunlop, A. R. & Seidler, G. T. (2019). J. Electrochem. Soc. 166, A2549–A2555. CrossRef CAS Google Scholar
JFreeChart (2021). JFreeChart 1.5.3, https://www.jfree.org/jfreechart/. Google Scholar
Kuai, L., Kan, E., Cao, W., Huttula, M., Ollikkala, S., Ahopelto, T., Honkanen, A., Huotari, S., Wang, W. & Geng, B. (2018). Nano Energy, 43, 81–90. CrossRef CAS Google Scholar
Lutz, C. & Fittschen, U. E. A. (2020). Powder Diffr. 35, S24–S28. Web of Science CrossRef CAS Google Scholar
Malzer, W., Grötzsch, G., Gnewkow, R., Schlesiger, C., Kowalewski, F., Van Kuiken, B., DeBeer, S. & Kanngießer, B. (2018). Rev. Sci. Instrum. 89, 113111. CrossRef PubMed Google Scholar
Mortensen, D. R., Seidler, G. T., Ditter, A. S. & Glatzel, P. (2016). J. Phys. Conf. Ser. 712, 012036. CrossRef Google Scholar
Mottram, L. M., Cafferkey, S., Mason, A. R., Oulton, T., Kuan Sun, S., Bailey, D. J., Stennett, M. C. & Hyatt, N. C. (2020c). J. Geosci. 65, 27–35. CrossRef Google Scholar
Mottram, L. M., Dixon Wilkins, M. C., Blackburn, L. R., Oulton, T., Stennett, M. C., Sun, S. K., Corkhill, C. L. & Hyatt, N. C. (2020a). MRS Adv. 5, 27–35. CrossRef CAS Google Scholar
Mottram, L. M., Stennett, M. C., Sun, S. K. & Hyatt, N. C. (2020b). IOP Conf. Ser.: Mater. Sci. Eng. 818, 012020. Google Scholar
Moya-Cancino, J. G., Honkanen, A. P., van der Eerden, A. M. J., Schaink, H., Folkertsma, L., Ghiasi, M., Longo, A., de Groot, F. M. F., Meirer, F., Huotari, S. & Weckhuysen, B. M. (2019). CatChemCat, 11, 1039–1044. CAS Google Scholar
Németh, Z., Szlachetko, J., Bajnóczi, E. G. & Vankó, G. (2016). Rev. Sci. Instrum. 87, 103105. PubMed Google Scholar
Nolis, G., Gallardo-Amores, J. M., Serrano-Sevillano, J., Jahrman, E., Yoo, H. D., Hu, L. H., Hancock, J. C., Bolotnikov, J., Kim, S., Freeland, J. W., Liu, Y. S., Poeppelmeier, K. R., Seidler, G. T., Guo, J. H., Alario-Franco, M. A., Casas-Cabanas, M., Morán, E. & Cabana, J. (2020). Chem. Mater. 32, 8203–8215. CrossRef CAS Google Scholar
Open Source Initiative (2021). The MIT Licence, https://opensource.org/licenses/MIT. Google Scholar
Ravel, B. & Newville, M. (2005). J. Synchrotron Rad. 12, 537–541. Web of Science CrossRef CAS IUCr Journals Google Scholar
Schlesiger, C., Anklamm, L., Stiel, H., Malzer, W. & Kanngießer, B. (2015). J. Anal. At. Spectrom. 30, 1080–1085. Web of Science CrossRef CAS Google Scholar
Seidler, G. T., Mortensen, D., Ditter, A., Ball, N. & Remesnik, A. (2016). J. Phys. Conf. Ser. 712, 012015. CrossRef Google Scholar
Seidler, G. T., Mortensen, D. R., Remesnik, A. J., Pacold, J. I., Ball, N. A., Barry, N., Styczinski, M. & Hoidn, O. R. (2014). Rev. Sci. Instrum. 85, 113906. Web of Science CrossRef PubMed Google Scholar
Stern, E. A. & Kim, K. (1981). Phys. Rev. B, 23, 3781–3787. CrossRef CAS Web of Science Google Scholar
Sun, S. K., Mottram, L. M. & Hyatt, N. C. (2021). J. Rare Earths, 39, 596–599. CrossRef CAS Google Scholar
Wittkowski, A., Schirmer, T., Qiu, H., Goldmann, D. & Fittschen, U. E. A. (2021). Metals, 11, 188. CrossRef Google Scholar
XIA, LLC (2009). MicroDXP Technical Reference Manual v1.1.2., https://xia.com/wp-content/uploads/2018/04/microDXP_Technical_Reference_Manual_v1.1.2.pdf. Google Scholar
Zeeshan, F., Hoszowska, J., Loperetti-Tornay, L. & Dousse, J. C. (2019). Rev. Sci. Instrum. 90, 073105. CrossRef PubMed Google Scholar
Zimmermann, P., Peredkov, S., Abdala, P. M., DeBeer, S., Tromp, M., Müller, C. & van Bokhoven, J. A. (2021). Coord. Chem. Rev. 423, 213466. CrossRef Google Scholar
This is an open-access article distributed under the terms of the Creative Commons Attribution (CC-BY) Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original authors and source are cited.