X-ray absorption spectroscopy (XAS) is a widely used technique for determining the local geometric and/or electronic structure of matter. The experiment is usually performed at synchrotron radiation facilities, which provide intense and tunable X-ray beams. Samples can be in the gas phase, solutions, or solids.