To perform LCA, the XANES spectra must first be normalized and the spectra from known compounds are selected to be used in the fitting procedure. The spectra of known compounds are combined linearly to fit the experimental measurements. We used Larch python modules to normalize each of the spectra with fitting regions kept consistent and to performed the LCA. We used the spectra shown in Fig. as our known compounds. The metallic Ni signal was measured from the NiCr foil placed directly in the beam without the BN cell, and the Ni 2+ signal is from a spectra from our closed cell (described in Section 3.1) at 500 °C with the beam placed far enough away from the foil to contain no metallic components. An example of the LCA of two spectra from the corrosion measurements are shown in Fig. . The top panel shows a spectra towards the start of the experiment with a majority Ni 2+ , and the bottom panel shows a spectra later in the experiments with a majority metallic component. The vertical red lines are the fitting regions that were consistent for every spectra.