An algorithm for the automatic deglitching of x-ray absorption spectroscopy data

Samuel M. Wallace, Marco A. Alsina, Jean François Gaillard*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review


Analysis of x-ray absorption spectroscopy (XAS) data often involves the removal of artifacts or glitches from the acquired signal, a process commonly known as deglitching. Glitches result either from specific orientations of monochromator crystals or from scattering by crystallites in the sample itself. Since the precise energy — or wavelength — location and the intensity of glitches in a spectrum cannot always be predicted, deglitching is often performed on a per spectrum basis by the analyst. Some routines have been proposed, but they are prone to arbitrary selection of spectral artifacts and are often inadequate for processing large data sets. Here we present a statistically robust algorithm, implemented as a Python program, for the automatic detection and removal of glitches that can be applied to a large number of spectra. It uses a Savitzky-Golay filter to smooth spectra and the generalized extreme Studentized deviate test to identify outliers. We achieve robust, repeatable, and selective removal of glitches using this algorithm.

Original languageEnglish (US)
JournalUnknown Journal
StatePublished - Nov 29 2020


  • Deglitching
  • Glitches
  • X-ray absorption spectroscopy

ASJC Scopus subject areas

  • General

Fingerprint Dive into the research topics of 'An algorithm for the automatic deglitching of x-ray absorption spectroscopy data'. Together they form a unique fingerprint.

Cite this