Search for a command to run...
X-ray absorption spectroscopy (XAS) is a powerful tool for probing the structural and electronic properties of materials, but its analysis is often challenging due to the low signal-to-noise ratio of the XAS spectra. Denoising of XAS spectra is particularly challenging because the measured spectral features span a broad range of feature widths. Such spectral feature variability is called non-stationarity. XAS spectra also suffer from energy-dependent noise and are often acquired using non-uniform energy sampling. While a broad range of denoising methods exists, they underperform when dealing with non-stationary and non-uniformly sampled signals. We introduce a novel stationarity warping approach, which transforms XAS spectra into a domain where they appear stationary, resulting in greatly improved denoising performance. This warping approach can be combined with any denoising method. We also implemented advanced denoisers based on Gaussian process regression and a convolutional autoencoder. All of the denoising and stationarity warping methods are packaged into a Python-based denoising software called XASDenoise, which provides a modular, easy-to-use denoising functionality of XAS measurements. Our benchmarking shows that stationarity warping consistently enhances spectral feature preservation and noise suppression across a diverse range of XAS datasets and is applicable to any denoising method.