Overall, a major advantage of this approach is that one can follow over the entire battery cycling process whether the algorithm provides meaningful results for the whole spectrum (m/z from 1 to 100). This minimizes the risk of missing unexpected gases or incorrectly attributing signals. The quality of the fit was tested by calculating the theoretical spectrum of the measured gas amounts and subtracting it from the original baseline corrected spectra. In an ideal scenario, the result should be zero as the algorithm can perfectly attribute all signals in the spectrum to a certain gas concentration.